From: Mike Bayer Date: Thu, 9 Aug 2018 18:35:52 +0000 (-0400) Subject: Correct for the INSERT statement, typos X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91534850e6a2e89dac525b35b8f426d5fae42390;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Correct for the INSERT statement, typos Change-Id: I036f3eb9b5e591515920678bc9a76f707fda142c (cherry picked from commit c85378d9841177b067a93c564edb1787703c6595) --- diff --git a/doc/build/orm/persistence_techniques.rst b/doc/build/orm/persistence_techniques.rst index 284c4440fe..64bae0696b 100644 --- a/doc/build/orm/persistence_techniques.rst +++ b/doc/build/orm/persistence_techniques.rst @@ -134,10 +134,11 @@ columns should be fetched immediately upon INSERT and sometimes UPDATE:: __mapper_args__ = {"eager_defaults": True} -Above, an INSERT statement will render "NOW()" as the value of "timestamp", -and the statement will also include the "timestamp" and "special_identifier" -columns within the RETURNING clause so they are available immediately. -On the PostgreSQL database, an INSERT for the above table will look like: +Above, an INSERT statement that does not specify explicit values for +"timestamp" or "special_identifier" from the client side will include the +"timestamp" and "special_identifier" columns within the RETURNING clause so +they are available immediately. On the PostgreSQL database, an INSERT for the +above table will look like: .. sourcecode:: sql @@ -167,7 +168,7 @@ they are marked as "expired". If the :paramref:`.orm.mapper.eager_defaults` is still used, and the backend database does not support RETURNING or an equivalent, the ORM will emit this SELECT statement immediately following the INSERT statement. This is often -undesireable as it adds additional SELECT statements to the flush process that +undesirable as it adds additional SELECT statements to the flush process that may not be needed. Using the above mapping with the :paramref:`.orm.mapper.eager_defaults` flag set to True against MySQL results in SQL like this upon flush (minus the comment, which is for clarification only):