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

Method get_all_tables

web/pgadmin/tools/erd/utils.py:127–144  ·  view source on GitHub ↗
(self, scid, tid)

Source from the content-addressed store, hash-verified

125 return SQL
126
127 def get_all_tables(self, scid, tid):
128 if tid is None and scid is None:
129 status, res = self.table_view.fetch_all_tables(
130 did=self.did, sid=self.sid)
131 elif tid is None:
132 status, res = self.table_view.fetch_all_tables(
133 did=self.did, sid=self.sid, scid=scid)
134 else:
135 prefs = Preferences.module('erd')
136 table_relation_depth = prefs.preference('table_relation_depth')
137 related = {}
138 status, res = self.table_view.traverse_related_tables(
139 did=self.did, sid=self.sid, scid=scid, tid=tid,
140 related=related, maxdepth=table_relation_depth.get()
141 )
142 if status:
143 res = list(related.values())
144 return status, res

Callers 1

tablesFunction · 0.95

Calls 5

fetch_all_tablesMethod · 0.80
moduleMethod · 0.80
preferenceMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected