From 590d5d99f0a8a86e0d118036ac0eacd33e52a6ad Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 9 Sep 2009 16:26:26 +0000 Subject: [PATCH] fix update examples for [ticket:1533] --- doc/build/sqlexpression.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/build/sqlexpression.rst b/doc/build/sqlexpression.rst index efdd1500f6..71a40e77f8 100644 --- a/doc/build/sqlexpression.rst +++ b/doc/build/sqlexpression.rst @@ -996,8 +996,8 @@ Finally, we're back to UPDATE. Updates work a lot like INSERTS, except there is COMMIT {stop} - >>> # update a column to an expression. Send a dictionary to values(): - {sql}>>> conn.execute(users.update().values({users.c.fullname:"Fullname: " + users.c.name})) #doctest: +ELLIPSIS + >>> # update a column to an expression.: + {sql}>>> conn.execute(users.update().values(fullname="Fullname: " + users.c.name)) #doctest: +ELLIPSIS UPDATE users SET fullname=(? || users.name) ['Fullname: '] COMMIT @@ -1011,7 +1011,7 @@ A correlated update lets you update a table using selection from another table, .. sourcecode:: pycon+sql >>> s = select([addresses.c.email_address], addresses.c.user_id==users.c.id).limit(1) - {sql}>>> conn.execute(users.update().values({users.c.fullname:s})) #doctest: +ELLIPSIS,+NORMALIZE_WHITESPACE + {sql}>>> conn.execute(users.update().values(fullname=s)) #doctest: +ELLIPSIS,+NORMALIZE_WHITESPACE UPDATE users SET fullname=(SELECT addresses.email_address FROM addresses WHERE addresses.user_id = users.id -- 2.47.3