(sql, db_path)
| 27 | |
| 28 | |
| 29 | def 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 | |
| 40 | def iterated_execute_sql(predicted_sql, ground_truth, db_path, iterate_num): |
no test coverage detected