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

Method _get_schemas

pgcli/pgcompleter.py:931–941  ·  view source on GitHub ↗

Returns a list of schemas from which to suggest objects. :param schema is the schema qualification input by the user (if any)

(self, obj_typ, schema)

Source from the content-addressed store, hash-verified

929 return columns
930
931 def _get_schemas(self, obj_typ, schema):
932 """Returns a list of schemas from which to suggest objects.
933
934 :param schema is the schema qualification input by the user (if any)
935
936 """
937 metadata = self.dbmetadata[obj_typ]
938 if schema:
939 schema = self.escape_name(schema)
940 return [schema] if schema in metadata else []
941 return self.search_path if self.search_path_filter else metadata.keys()
942
943 def _maybe_schema(self, schema, parent):
944 return None if parent or schema in self.search_path else schema

Callers 2

populate_functionsMethod · 0.95

Calls 1

escape_nameMethod · 0.95

Tested by

no test coverage detected