mirror of
https://github.com/simonw/datasette.git
synced 2026-10-19 07:47:00 +02:00
Merge c902f12ea4 into cf113a5985
This commit is contained in:
commit
1427a06960
1 changed files with 2 additions and 1 deletions
|
|
@ -385,7 +385,8 @@ INSERT INTO "searchable_fts" (rowid, text1, text2)
|
|||
@documented(label="datasette_fixtures_populate_fixture_database")
|
||||
def populate_fixture_database(conn):
|
||||
"""Populate a SQLite connection with Datasette's test fixture tables."""
|
||||
conn.executescript(TABLES)
|
||||
# TABLES is ~1,440 INSERTs; without a wrapping transaction each one commits on its own.
|
||||
conn.executescript("BEGIN;" + TABLES + "COMMIT;")
|
||||
for sql, params in TABLE_PARAMETERIZED_SQL:
|
||||
with conn:
|
||||
conn.execute(sql, params)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue