MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / get_schemas

Function get_schemas

web/pgadmin/tools/schema_diff/__init__.py:788–805  ·  view source on GitHub ↗

This function will return the list of schemas for the specified server id and database id.

(sid, did)

Source from the content-addressed store, hash-verified

786
787
788def get_schemas(sid, did):
789 """
790 This function will return the list of schemas for the specified
791 server id and database id.
792 """
793 try:
794 view = SchemaDiffRegistry.get_node_view('schema')
795 server = get_server_access(sid)
796 if server is None:
797 return None
798 response = view.nodes(gid=server.servergroup_id, sid=sid, did=did,
799 is_schema_diff=True)
800 schemas = json.loads(response.data)['data']
801 return schemas
802 except Exception as e:
803 app.logger.exception(e)
804
805 return None
806
807
808def compare_database_objects(**kwargs):

Callers 2

schemasFunction · 0.70
fetch_compare_schemasFunction · 0.70

Calls 2

get_node_viewMethod · 0.80
nodesMethod · 0.45

Tested by

no test coverage detected