MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / pgsql_results

Method pgsql_results

bmtools/tools/database/utils/database.py:127–138  ·  view source on GitHub ↗
(self, sql)

Source from the content-addressed store, hash-verified

125 return 1, res
126
127 def pgsql_results(self, sql):
128 try:
129 #success, res = self.execute_sql('explain (FORMAT JSON, analyze) ' + sql)
130 success, res = self.execute_sql(sql)
131 #print("pgsql_results", success, res)
132 if success == 1:
133 return res
134 else:
135 return "<fail>"
136 except Exception as error:
137 logging.error('pgsql_results Exception', error)
138 return "<fail>"
139
140
141 def pgsql_cost_estimation(self, sql):

Callers 1

select_database_dataFunction · 0.45

Calls 1

execute_sqlMethod · 0.95

Tested by

no test coverage detected