1 parent b7d6bcd commit 645befeCopy full SHA for 645befe
1 file changed
litequery/core.py
@@ -218,8 +218,8 @@ def connect(self):
218
else:
219
conn = sqlite3.connect(self.config.database_path, timeout=5)
220
conn.row_factory = row_factory
221
- for pragma, value in self.PRAGMAS:
222
- conn.execute(f"pragma {pragma} = {value}")
+ pragmas = (f"pragma {p} = {v}" for p, v in self.PRAGMAS)
+ conn.executescript(";".join(pragmas))
223
try:
224
yield conn
225
finally:
0 commit comments