From 242dd8bc371e62460b002836f057339970c8145e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 9 Aug 2018 14:35:52 -0400 Subject: [PATCH] Correct for the INSERT statement, typos Change-Id: I036f3eb9b5e591515920678bc9a76f707fda142c (cherry picked from commit c85378d9841177b067a93c564edb1787703c6595) --- doc/build/orm/persistence_techniques.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/build/orm/persistence_techniques.rst b/doc/build/orm/persistence_techniques.rst index 9c7774f6fe..5a39d3acf6 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): -- 2.47.3