This repository was archived by the owner on Mar 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class ST(sublime_plugin.EventListener):
2222 conn = None
2323 history = []
2424 tables = []
25+ functions = []
2526 columns = []
2627 connectionList = {}
2728 autoCompleteList = []
@@ -32,20 +33,20 @@ def bootstrap():
3233 ST .checkDefaultConnection ()
3334
3435 @staticmethod
35- def setTablesIfNotEmpty ( tables ):
36- if type (tables ) is list and len (tables ) == 0 :
36+ def setAttrIfNotEmpty ( attr , value ):
37+ if type (value ) is list and len (value ) == 0 :
3738 # sublime.message_dialog('Connection failed. Check your settings and try again.')
3839 return
39- ST . tables = tables
40+ setattr ( ST , attr , value )
4041
4142 @staticmethod
4243 def loadConnectionData ():
4344 if not ST .conn :
4445 return
4546
46- ST .conn .getTables (lambda tables : ST .setTablesIfNotEmpty ( tables ))
47- ST .conn .getColumns (lambda columns : setattr ( ST , 'columns' , columns ))
48- ST .conn .getFunctions (lambda functions : setattr ( ST , 'functions' , functions ))
47+ ST .conn .getTables (lambda tables : ST .setAttrIfNotEmpty ( 'tables' , tables ))
48+ ST .conn .getColumns (lambda columns : ST . setAttrIfNotEmpty ( 'columns' , columns ))
49+ ST .conn .getFunctions (lambda functions : ST . setAttrIfNotEmpty ( 'functions' , functions ))
4950
5051 @staticmethod
5152 def setConnection (index ):
You can’t perform that action at this time.
0 commit comments