diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-13 16:08:34 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-15 17:27:27 -0400 |
commit | 927abc3b33f10464ed04db3d7a454faeb6e729f2 (patch) | |
tree | f7d6b727a3178c3c01ccc9e78b0f8c957ed1fefa /lib/sqlalchemy/dialects/sqlite/base.py | |
parent | 257de6ebe15d3076e19f05f93c5b3c7fae25a4d3 (diff) | |
download | sqlalchemy-927abc3b33f10464ed04db3d7a454faeb6e729f2.tar.gz |
render col name in on conflict set clause, not given key
Fixed bug where the PostgreSQL :meth:`_postgresql.Insert.on_conflict`
method and the SQLite :meth:`_sqlite.Insert.on_conflict` method would both
fail to correctly accommodate a column with a separate ".key" when
specifying the column using its key name in the dictionary passed to
``set_``, as well as if the :attr:`_sqlite.Insert.excluded` or
:attr:`_postgresql.Insert.excluded` collection were used as the dictionary
directly.
Fixes: #8014
Change-Id: I67226aeedcb2c683e22405af64720cc1f990f274
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/sqlite/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index ab525581a..2ce298436 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -1415,7 +1415,7 @@ class SQLiteCompiler(compiler.SQLCompiler): value.type = c.type value_text = self.process(value.self_group(), use_schema=False) - key_text = self.preparer.quote(col_key) + key_text = self.preparer.quote(c.name) action_set_ops.append("%s = %s" % (key_text, value_text)) # check for names that don't match columns |