MCPcopy Index your code
hub / github.com/dbcli/pgcli / populate_schema_objects

Method populate_schema_objects

pgcli/pgcompleter.py:946–957  ·  view source on GitHub ↗

Returns a list of SchemaObjects representing tables or views. :param schema is the schema qualification input by the user (if any)

(self, schema, obj_type)

Source from the content-addressed store, hash-verified

944 return None if parent or schema in self.search_path else schema
945
946 def populate_schema_objects(self, schema, obj_type):
947 """Returns a list of SchemaObjects representing tables or views.
948
949 :param schema is the schema qualification input by the user (if any)
950
951 """
952
953 return [
954 SchemaObject(name=obj, schema=(self._maybe_schema(schema=sch, parent=schema)))
955 for sch in self._get_schemas(obj_type, schema)
956 for obj in self.dbmetadata[obj_type][sch].keys()
957 ]
958
959 def populate_functions(self, schema, filter_func):
960 """Returns a list of function SchemaObjects.

Callers 3

get_table_matchesMethod · 0.95
get_view_matchesMethod · 0.95
get_datatype_matchesMethod · 0.95

Calls 3

_maybe_schemaMethod · 0.95
_get_schemasMethod · 0.95
SchemaObjectFunction · 0.85

Tested by

no test coverage detected