mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 00:54:19 +01:00
bindings/python: Rename package to pyturso
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
import json
|
||||
|
||||
import limbo
|
||||
import turso
|
||||
from antithesis.random import get_random
|
||||
from utils import generate_random_value
|
||||
|
||||
# Get initial state
|
||||
try:
|
||||
con_init = limbo.connect("init_state.db")
|
||||
con_init = turso.connect("init_state.db")
|
||||
except Exception as e:
|
||||
print(f"Error connecting to database: {e}")
|
||||
exit(0)
|
||||
@@ -21,7 +21,7 @@ tbl_schema = json.loads(cur_init.execute(f"SELECT schema FROM schemas WHERE tbl
|
||||
cols = ", ".join([f"col_{col}" for col in range(tbl_schema["colCount"])])
|
||||
|
||||
try:
|
||||
con = limbo.connect("stress_composer.db")
|
||||
con = turso.connect("stress_composer.db")
|
||||
except Exception as e:
|
||||
print(f"Failed to open stress_composer.db. Exiting... {e}")
|
||||
exit(0)
|
||||
@@ -39,7 +39,7 @@ for i in range(insertions):
|
||||
INSERT INTO tbl_{selected_tbl} ({cols})
|
||||
VALUES ({", ".join(values)})
|
||||
""")
|
||||
except limbo.OperationalError as e:
|
||||
except turso.OperationalError as e:
|
||||
if "UNIQUE constraint failed" in str(e):
|
||||
# Ignore UNIQUE constraint violations
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user