summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/dml.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-02-08 14:53:21 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-02-08 14:53:21 -0500
commit660ff51df0433607b12c58a12c7355107c1773f5 (patch)
tree95c43ce2401ee5aee3d8b3dfa6d241c633d23279 /lib/sqlalchemy/dialects/mysql/dml.py
parent47aa62abde6eba67802f2f7126cc79fbd95b5d1a (diff)
downloadsqlalchemy-660ff51df0433607b12c58a12c7355107c1773f5.tar.gz
Fixes for public_factory and mysql/pg dml functions
* ensure that the location indicated by public_factory is importable * adjust all of sqlalchemy.sql.expression locations to be correct * support the case where a public_factory is against a function that has another public_factory already, and already replaced the __init__ on the target class * Use mysql.insert(), postgresql.insert(), don't include .dml in the class path. Change-Id: Iac285289455d8d7102349df3814f7cedc758e639
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/dml.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/dml.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/dml.py b/lib/sqlalchemy/dialects/mysql/dml.py
index b43b364fa..531b31bc3 100644
--- a/lib/sqlalchemy/dialects/mysql/dml.py
+++ b/lib/sqlalchemy/dialects/mysql/dml.py
@@ -15,6 +15,9 @@ class Insert(StandardInsert):
Adds methods for MySQL-specific syntaxes such as ON DUPLICATE KEY UPDATE.
+ The :class:`~.mysql.Insert` object is created using the
+ :func:`sqlalchemy.dialects.mysql.insert` function.
+
.. versionadded:: 1.2
"""
@@ -105,7 +108,9 @@ class Insert(StandardInsert):
self._post_values_clause = OnDuplicateClause(inserted_alias, values)
-insert = public_factory(Insert, ".dialects.mysql.insert")
+insert = public_factory(
+ Insert, ".dialects.mysql.insert", ".dialects.mysql.Insert"
+)
class OnDuplicateClause(ClauseElement):