Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ITKEY_
Vim Sql Workbench
提交
d1299d0b
V
Vim Sql Workbench
项目概览
ITKEY_
/
Vim Sql Workbench
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vim Sql Workbench
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d1299d0b
编写于
3月 01, 2015
作者:
C
Cosmin Popescu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
solving issue 5
上级
b9dacf31
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
4 deletion
+13
-4
autoload/sw.vim
autoload/sw.vim
+9
-0
autoload/sw/autocomplete.vim
autoload/sw/autocomplete.vim
+1
-1
autoload/sw/search.vim
autoload/sw/search.vim
+1
-1
autoload/sw/sqlwindow.vim
autoload/sw/sqlwindow.vim
+2
-2
未找到文件。
autoload/sw.vim
浏览文件 @
d1299d0b
...
...
@@ -88,12 +88,21 @@ function! sw#async_end()
unlet
b:async_on_progress
if
exists
(
'b:on_async_result'
)
let
func
=
b:on_async_result
unlet
b:on_async_result
execute
"call "
.
func
.
"()"
endif
call
s:delete_tmp
()
endif
endfunction
function
!
sw
#set_on_async_result
(
value
)
if
exists
(
'b:on_async_result'
)
&&
exists
(
'b:async_on_progress'
)
throw
'There is a command in progress for this buffer. Please wait for it to finish.'
endif
let
b:on_async_result
=
a:value
endfunction
function
!
sw
#reset_current_command
()
let
idx
=
index
(
g:sw_async_ended
,
s:get_buff_unique_id
())
if
idx
!=
-1
...
...
autoload/sw/autocomplete.vim
浏览文件 @
d1299d0b
...
...
@@ -154,7 +154,7 @@ function! sw#autocomplete#cache()
let
sql
=
sql
.
"WbExport -type=xml -file="
.
g:sw_tmp
.
"/sw_procs.xml -stylesheet="
.
s:script_path
.
"resources/wbprocedures2vim.xslt -lineEnding=lf -xsltOutput="
.
g:sw_tmp
.
"/sw_procs.vim;\n"
let
sql
=
sql
.
"WBListProcs;"
let
b:on_async_result
=
'sw#autocomplete#got_result'
call
sw
#set_on_async_result
(
'sw#autocomplete#got_result'
)
let
result
=
sw
#execute_sql
(
b:profile
,
sql
)
if
!
sw
#is_async
()
unlet
b:on_async_result
...
...
autoload/sw/search.vim
浏览文件 @
d1299d0b
...
...
@@ -204,7 +204,7 @@ function! s:process_search_result(result, columns)
endfunction
function
!
s:set_async_variables
(
columns
)
let
b:on_async_result
=
'sw#search#on_async_result'
call
sw
#set_on_async_result
(
'sw#search#on_async_result'
)
let
b:on_async_kill
=
'sw#search#on_async_kill'
let
b:__columns
=
a:columns
endfunction
...
...
autoload/sw/sqlwindow.vim
浏览文件 @
d1299d0b
...
...
@@ -149,7 +149,7 @@ function! sw#sqlwindow#export_last()
endfunction
function
!
sw
#sqlwindow#extract_current_sql
(...)
let
lines
=
getbufline
(
bufname
(
bufnr
(
'
.
'
)),
1
,
'$'
)
let
lines
=
getbufline
(
bufname
(
bufnr
(
'
%
'
)),
1
,
'$'
)
let
pos
=
getpos
(
'.'
)
let
n
=
pos
[
2
]
-
2
let
m
=
n
+
1
...
...
@@ -509,7 +509,7 @@ function! sw#sqlwindow#execute_sql(sql)
if
(
b:max_results
!=
0
)
let
_sql
=
w
:
auto_added1
.
'set maxrows = '
.
b:max_results
.
"\n"
.
b:delimiter
.
"\n"
.
w
:
auto_added2
.
_sql
endif
let
b:on_async_result
=
'sw#sqlwindow#on_async_result'
call
sw
#set_on_async_result
(
'sw#sqlwindow#on_async_result'
)
let
b:on_async_kill
=
'sw#sqlwindow#on_async_kill'
let
result
=
sw
#execute_sql
(
b:profile
,
_sql
,
0
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录