@@ -172,6 +172,8 @@ def extend_casing(self, words):
172172 self .casing = dict ((word .lower (), word ) for word in words )
173173
174174 def extend_functions (self , func_data ):
175+ """ OG: Currently not used
176+ """
175177
176178 # func_data is a list of function metadata namedtuples
177179
@@ -195,6 +197,8 @@ def extend_functions(self, func_data):
195197 self ._refresh_arg_list_cache ()
196198
197199 def _refresh_arg_list_cache (self ):
200+ """ OG: Currently not used
201+ """
198202 # We keep a cache of {function_usage:{function_metadata: function_arg_list_string}}
199203 # This is used when suggesting functions, to avoid the latency that would result
200204 # if we'd recalculate the arg lists each time we suggest functions (in
@@ -212,6 +216,8 @@ def _refresh_arg_list_cache(self):
212216 }
213217
214218 def extend_foreignkeys (self , fk_data ):
219+ """ OG: Currently not used
220+ """
215221
216222 # fk_data is a list of ForeignKey namedtuples, with fields
217223 # parentschema, childschema, parenttable, childtable,
@@ -237,6 +243,8 @@ def extend_foreignkeys(self, fk_data):
237243 parcolmeta .foreignkeys .append ((fk ))
238244
239245 def extend_datatypes (self , type_data ):
246+ """ OG: Currently not used
247+ """
240248
241249 # dbmetadata['datatypes'][schema_name][type_name] should store type
242250 # metadata, such as composite type field names. Currently, we're not
@@ -576,7 +584,7 @@ def get_join_matches(self, suggestion, word_before_cursor):
576584
577585 def get_join_condition_matches (self , suggestion , word_before_cursor ):
578586 col = namedtuple ('col' , 'schema tbl col' )
579- tbls = self .populate_scoped_cols (suggestion .table_refs ).items
587+ tbls = self .populate_scoped_cols2 (suggestion .table_refs ).items
580588 cols = [(t , c ) for t , cs in tbls () for c in cs ]
581589 try :
582590 lref = (suggestion .parent or suggestion .table_refs [- 1 ]).ref
@@ -630,8 +638,9 @@ def list_dict(pairs): # Turns [(a, b), (a, c)] into {a: [b, c]}
630638 # TODO: Need to account for suggestion.catalog
631639 def get_function_matches (
632640 self , suggestion , word_before_cursor , alias = False ):
633-
634- # OG: hack early exit, for now
641+ """ OG: currently not used / hacked to exit early
642+ """
643+ # OG: hack early exit
635644 return []
636645 # We'll have to do away with this right? How can we possibly know this
637646 if suggestion .usage == 'from' :
@@ -668,8 +677,6 @@ def filt(_):
668677
669678 def get_schema_matches (self , suggestion , word_before_cursor ):
670679 conn = self .active_conn
671- metadata = conn .dbmetadata .data
672- submeta = metadata ['table' ]
673680 if suggestion .parent :
674681 catalog_u = self .unescape_name (suggestion .parent )
675682 else :
@@ -830,7 +837,6 @@ def get_alias_matches(self, suggestion, word_before_cursor):
830837
831838 def get_database_matches (self , _ , word_before_cursor ):
832839 conn = self .active_conn
833- metadata = conn .dbmetadata .data
834840 catalogs_e = conn .dbmetadata .get_catalogs ()
835841 if catalogs_e is None and (conn .connected ()):
836842 catalogs_e = self .escape_names (conn .list_catalogs ())
@@ -879,6 +885,8 @@ def get_special_matches(self, _, word_before_cursor):
879885 return self .find_matches (word_before_cursor , cmds , mode = 'strict' )
880886
881887 def get_datatype_matches (self , suggestion , word_before_cursor ):
888+ """ OG: Currently not used
889+ """
882890 # suggest custom datatypes
883891 types = self .populate_schema_objects (suggestion .schema , 'datatypes' )
884892 types = [self ._make_cand (t , False , suggestion ) for t in types ]
@@ -909,7 +917,7 @@ def get_datatype_matches(self, suggestion, word_before_cursor):
909917 Database : get_database_matches ,
910918 Keyword : get_keyword_matches ,
911919 Special : get_special_matches ,
912- Datatype : get_datatype_matches ,
920+ # Datatype: get_datatype_matches,
913921# NamedQuery: get_namedquery_matches,
914922 Path : get_path_matches ,
915923 }
@@ -1027,7 +1035,8 @@ def addcols(catalog, schema, rel, alias, reltype, cols):
10271035 return columns
10281036
10291037 def _get_schemas (self , obj_typ , schema ):
1030- """Returns a list of schemas from which to suggest objects.
1038+ """ OG: Currently not used
1039+ Returns a list of schemas from which to suggest objects.
10311040
10321041 :param schema is the schema qualification input by the user (if any)
10331042
@@ -1044,7 +1053,8 @@ def _maybe_schema(self, schema, parent):
10441053 return None if parent or schema in self .search_path else schema
10451054
10461055 def populate_schema_objects (self , schema , obj_type ):
1047- """Returns a list of SchemaObjects representing tables or views.
1056+ """ OG: Currently not used
1057+ Returns a list of SchemaObjects representing tables or views.
10481058
10491059 :param schema is the schema qualification input by the user (if any)
10501060
@@ -1070,8 +1080,6 @@ def populate_objects(self, catalog, schema, obj_type):
10701080 ret = []
10711081 obj_names = []
10721082 conn = self .active_conn
1073- metadata = conn .dbmetadata .data
1074- submeta = metadata [obj_type ]
10751083 self .logger .debug ("populate_objects(%s): Called for %s.%s" ,
10761084 obj_type , catalog , schema )
10771085 if catalog is None and schema is None :
@@ -1144,7 +1152,8 @@ def populate_objects(self, catalog, schema, obj_type):
11441152 return ret
11451153
11461154 def populate_functions (self , schema , filter_func ):
1147- """Returns a list of function SchemaObjects.
1155+ """ OG: currently not used.
1156+ Returns a list of function SchemaObjects.
11481157
11491158 :param filter_func is a function that accepts a FunctionMetadata
11501159 namedtuple and returns a boolean indicating whether that
0 commit comments