MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / execute_sql

Function execute_sql

evaluation/src/evaluation_ves.py:29–37  ·  view source on GitHub ↗
(sql, db_path)

Source from the content-addressed store, hash-verified

27
28
29def execute_sql(sql, db_path):
30 # Connect to the database
31 conn = sqlite3.connect(db_path)
32 # Create a cursor object
33 cursor = conn.cursor()
34 start_time = time.time()
35 cursor.execute(sql)
36 exec_time = time.time() - start_time
37 return exec_time
38
39
40def iterated_execute_sql(predicted_sql, ground_truth, db_path, iterate_num):

Callers 1

iterated_execute_sqlFunction · 0.70

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected