Merge pull request #34494 from tanmoysrt/sqlite_fix
fix(sqlite): Use DEFERRED isolation level
This commit is contained in:
commit
139ae9ef6c
1 changed files with 1 additions and 1 deletions
|
|
@ -105,12 +105,12 @@ class SQLiteDatabase(SQLiteExceptionUtil, Database):
|
|||
|
||||
def get_connection(self, read_only: bool = False):
|
||||
conn = self.create_connection(read_only)
|
||||
conn.isolation_level = None
|
||||
conn.create_function("regexp", 2, regexp)
|
||||
conn.create_function("regexp_replace", 3, regexp_replace)
|
||||
pragmas = {
|
||||
"journal_mode": "WAL",
|
||||
"synchronous": "NORMAL",
|
||||
"busy_timeout": 5000, # in milliseconds
|
||||
}
|
||||
cursor = conn.cursor()
|
||||
for pragma, value in pragmas.items():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue