move sql related functions into sql.ls
extract build_view_source
create views with columns and computed columns