MCPcopy Create free account
hub / github.com/Snowflake-Labs/ReFoRCE / execute_sql_api

Method execute_sql_api

methods/ReFoRCE/sql.py:133–149  ·  view source on GitHub ↗
(self, sql_query, ex_id, save_path=None, api="sqlite", max_len=30000, sqlite_path=None, timeout=300)

Source from the content-addressed store, hash-verified

131
132 def execute_sql_api(self, sql_query, ex_id, save_path=None, api="sqlite", max_len=30000, sqlite_path=None):
133 if api == "bigquery":
134 return self.exec_sql_bq(sql_query, save_path, max_len)
135 elif api == "snowflake":
136 if ex_id not in self.conns.keys():
137 self.start_db_sf(ex_id)
138 return self.exec_sql_sf(sql_query, save_path, max_len, ex_id)
139 elif api == "sqlite":
140 if sqlite_path not in self.conns.keys():
141 self.start_db_sqlite(sqlite_path)
142 return self.exec_sql_sqlite(sql_query, save_path, max_len, sqlite_path)

Callers 7

executeFunction · 0.95
process_sql_dataFunction · 0.95
update_resultsFunction · 0.95
model_voteMethod · 0.95
execute_sqlsMethod · 0.80
self_refineMethod · 0.80
genMethod · 0.80

Calls 5

exec_sql_bqMethod · 0.95
start_db_sfMethod · 0.95
exec_sql_sfMethod · 0.95
start_db_sqliteMethod · 0.95

Tested by

no test coverage detected