提交 acc41ef4 编写于 作者: C Cosmin Popescu

resolve #33

上级 86226160
......@@ -1532,3 +1532,14 @@ function! sw#sqlwindow#filter_with_sql(where_part)
call sw#sqlwindow#refresh_resultset()
endfunction
function! s:include(file, delimiter)
let sql = 'wbinclude -delimiter="' . a:delimiter . '" -file="' . a:file . '"' . ';'
call sw#sqlwindow#execute_sql(sql)
endfunction
function! sw#sqlwindow#include(alt_delimiter, ...)
let delimiter = s:get_delimiter(a:alt_delimiter)
let file = a:0 ? a:1 : sw#bufname('%')
call s:include(file, delimiter)
endfunction
......@@ -248,6 +248,7 @@ command! -bang -nargs=+ -complete=customlist,sw#sqlwindow#complete_insert SWSqlG
command! -nargs=0 SWSqlGetMacroSql call sw#to_clipboard(sw#sqlwindow#get_macro_sql(expand('<cword>')))
command! -nargs=0 SWSqlInsertMatch call sw#sqlwindow#match()
command! -bang -nargs=0 SWSqlWipeoutResultsSets call sw#sqlwindow#wipeout_resultsets(<bang>0)
command! -bang -nargs=? -complete=file SWInclude call sw#sqlwindow#include(<bang>0, <f-args>)
command! -nargs=+ -complete=customlist,sw#autocomplete_profile SWServerStart call sw#server#run(<f-args>)
command! -nargs=1 SWServerStop call sw#server#stop(<f-args>)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册