|
|
@@ -135,13 +135,14 @@ class Sqlite3Engine(BaseDatabaseEngine[sqlite3.Connection, sqlite3.Cursor]): |
|
|
|
> than one statement with it, it will raise a Warning. Use executescript() if |
|
|
|
> you want to execute multiple SQL statements with one call. |
|
|
|
|
|
|
|
Though the docs for `executescript` warn: |
|
|
|
The script is wrapped in transaction control statemnets, since the docs for |
|
|
|
`executescript` warn: |
|
|
|
|
|
|
|
> If there is a pending transaction, an implicit COMMIT statement is executed |
|
|
|
> first. No other implicit transaction control is performed; any transaction |
|
|
|
> control must be added to sql_script. |
|
|
|
""" |
|
|
|
cursor.executescript(script) |
|
|
|
cursor.executescript(f"BEGIN TRANSACTION;\n{script}\nCOMMIT;") |
|
|
|
|
|
|
|
|
|
|
|
# Following functions taken from: https://github.com/coleifer/peewee |
|
|
|