]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add 'exists' to SQLite's reserved keywords
authorThodoris Sotiropoulos <theosotr@aueb.gr>
Thu, 11 Jun 2020 14:50:41 +0000 (10:50 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 11 Jun 2020 14:53:47 +0000 (10:53 -0400)
Added "exists" to the list of reserved words for SQLite so that this word
will be quoted when used as a label or column name. Pull request courtesy
Thodoris Sotiropoulos.

Fixes: #5395
Closes: #5396
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5396
Pull-request-sha: 5608317a38db7b63115e3b467d182a3e5cc31580

Change-Id: Ia4769de2dec159dcf282eb4b30c11560da51a5c7
(cherry picked from commit ed4a4896aea7dd77dd5d8a9861302811ac421e47)

doc/build/changelog/unreleased_13/5395.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/sqlite/base.py
test/dialect/test_sqlite.py

diff --git a/doc/build/changelog/unreleased_13/5395.rst b/doc/build/changelog/unreleased_13/5395.rst
new file mode 100644 (file)
index 0000000..9e11cdc
--- /dev/null
@@ -0,0 +1,7 @@
+.. change::
+    :tags: bug, sqlite
+    :tickets: 5395
+
+    Added "exists" to the list of reserved words for SQLite so that this word
+    will be quoted when used as a label or column name. Pull request courtesy
+    Thodoris Sotiropoulos.
index d19474bff394ba909a2d31de23638eb73e9677a4..5fd856eee3e3a34c58e0e81a35928ec66fbcd86b 100644 (file)
@@ -1335,6 +1335,7 @@ class SQLiteIdentifierPreparer(compiler.IdentifierPreparer):
             "escape",
             "except",
             "exclusive",
+            "exists",
             "explain",
             "false",
             "fail",
index a03ad1fdaaa20bbca2cab2ba52e68c6d68770372..c6ac94aeb66ee5900ee95f9cda415efa0b4daedb 100644 (file)
@@ -614,6 +614,7 @@ class DialectTest(
             Column("true", Integer),
             Column("false", Integer),
             Column("column", Integer),
+            Column("exists", Integer),
         )
         try:
             meta.create_all()