]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
-removed useless log statement (merge garbage?)
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 18 May 2008 17:09:21 +0000 (17:09 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 18 May 2008 17:09:21 +0000 (17:09 +0000)
- clarified autocommit mechanism

doc/build/content/dbengine.txt
lib/sqlalchemy/log.py

index 0236a6f70f9826f53e9847dd683cb1696e9d4748..02f63bc2abc1b3b2d302fc254cfd0c04a2a9fd74 100644 (file)
@@ -235,7 +235,7 @@ Transaction Facts:
 
 #### Understanding Autocommit
 
-The above transaction example illustrates how to use `Transaction` so that several executions can take part in the same transaction.  What happens when we issue an INSERT, UPDATE or DELETE call without using `Transaction`?  The answer is **autocommit**.  While many DBAPIs  implement a flag called `autocommit`, the current SQLAlchemy behavior is such that it implements its own autocommit.  This is achieved by searching the statement for strings like INSERT, UPDATE, DELETE, etc. and then issuing a COMMIT automatically if no transaction is in progress.
+The above transaction example illustrates how to use `Transaction` so that several executions can take part in the same transaction.  What happens when we issue an INSERT, UPDATE or DELETE call without using `Transaction`?  The answer is **autocommit**.  While many DBAPIs  implement a flag called `autocommit`, the current SQLAlchemy behavior is such that it implements its own autocommit.  This is achieved by detecting statements which represent data-changing operations, i.e. INSERT, UPDATE, DELETE, etc., and then issuing a COMMIT automatically if no transaction is in progress.  The detection is based on compiled statement attributes, or in the case of a text-only statement via regular expressions.
 
     {python}
     conn = engine.connect()
index 06aa47eba60fd9bb4c1093ff25314ba8e88ca36f..762f56ef53e58650d0248e3783998055c06893ae 100644 (file)
@@ -56,8 +56,6 @@ def _get_instance_name(instance):
     return "%s.%s.0x..%s" % (instance.__class__.__module__,
                              instance.__class__.__name__,
                              hex(id(instance))[-2:])
-    return (instance.__class__.__module__ + "." + instance.__class__.__name__ +
-            ".0x.." + hex(id(instance))[-2:])
 
 def class_logger(cls):
     return logging.getLogger(cls.__module__ + "." + cls.__name__)