summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoichi NAKAYAMA <yoichi.nakayama@gmail.com>2017-10-24 16:00:21 +0900
committerGitHub <noreply@github.com>2017-10-24 16:00:21 +0900
commit521951b55d6184844499ba41438db19397deff87 (patch)
treedde5a678b337bea1d3f63b599b235f29e34943e2
parentda4b0a41e1f3ce7530fe25137aa3d7ed77f3171e (diff)
downloadsqlalchemy-521951b55d6184844499ba41438db19397deff87.tar.gz
Fix typo in "on duplicate key update" example
-rw-r--r--doc/build/changelog/migration_12.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/build/changelog/migration_12.rst b/doc/build/changelog/migration_12.rst
index 5eba2def5..0205c8718 100644
--- a/doc/build/changelog/migration_12.rst
+++ b/doc/build/changelog/migration_12.rst
@@ -1459,17 +1459,17 @@ is now supported using a MySQL-specific version of the
This :class:`~.expression.Insert` subclass adds a new method
:meth:`~.mysql.dml.Insert.on_duplicate_key_update` that implements MySQL's syntax::
- from sqlalchemy.dialect.mysql import insert
+ from sqlalchemy.dialects.mysql import insert
insert_stmt = insert(my_table). \\
values(id='some_id', data='some data to insert')
on_conflict_stmt = insert_stmt.on_duplicate_key_update(
- data=stmt.inserted.data,
+ data=insert_stmt.inserted.data,
status='U'
)
- conn.execute(do_update_stmt)
+ conn.execute(on_conflict_stmt)
The above will render::