]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add quotes around PRAGMA values in pysqlcipher connect.
authorKevin Jurczyk <oss@k-jurczyk.de>
Tue, 8 Nov 2016 17:12:16 +0000 (12:12 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 8 Nov 2016 17:16:57 +0000 (12:16 -0500)
Arguments such as cipher, kdf_iter, cipher_page_size and
cipher_use_hmac may (always?) require quotes within the
PRAGMA directive.

Change-Id: I2c808f34e1c44f0593b72b304e170e4af0a6035a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/319

doc/build/changelog/changelog_11.rst
lib/sqlalchemy/dialects/sqlite/pysqlcipher.py

index d8f785556a4f5a0faa2fd7d8e60b3d0821d4ad14..4c8bdc7d96ba58f8c63215341abdba3c73e29e66 100644 (file)
 .. changelog::
     :version: 1.1.4
 
+    .. change::
+        :tags: bug, sqlite
+
+        Added quotes to the PRAGMA directives in the pysqlcipher dialect
+        to support additional cipher arguments appropriately.  Pull request
+        courtesy Kevin Jurczyk.
+
     .. change::
         :tags: bug, postgresql
         :tickets: 3846, 3807
index bbafc8d60cfd4a5cd879ca17544a3f7a76d9245f..4a501acaccfa4969a96d6a0366019e0654daa13e 100644 (file)
@@ -100,7 +100,7 @@ class SQLiteDialect_pysqlcipher(SQLiteDialect_pysqlite):
         conn.execute('pragma key="%s"' % passphrase)
         for prag, value in pragmas.items():
             if value is not None:
-                conn.execute('pragma %s=%s' % (prag, value))
+                conn.execute('pragma %s="%s"' % (prag, value))
 
         return conn