]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
doc edits, moved object display in uowdumper to be hex, fixed test runner in parseconnect
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 25 Sep 2006 16:22:32 +0000 (16:22 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 25 Sep 2006 16:22:32 +0000 (16:22 +0000)
doc/build/content/sqlconstruction.txt
lib/sqlalchemy/engine/__init__.py
lib/sqlalchemy/orm/uowdumper.py
test/engine/parseconnect.py

index a7c2ef23fb44e93443e90d68b6108d99c2d0f14e..ed8faae680c4d5b3fc01be727019d1e95d4e8021 100644 (file)
@@ -132,7 +132,7 @@ The object returned by `execute()` is a `sqlalchemy.engine.ResultProxy` object,
     # return the underlying connection resources back to 
     # the connection pool.  de-referencing the result
     # will also have the same effect.  if an explicit Connection was 
-    # used, then close() does nothing.
+    # used, then close() just closes the underlying cursor object.
     result.close()
 
 #### Using Column Labels {@name=labels}
index 2cb94a90d63a9552eb537a668ba907cba1558a73..e2a8edf69550c6b32043821f2221c8645867783e 100644 (file)
@@ -38,7 +38,7 @@ def create_engine(*args, **kwargs):
     locates that strategy and invokes its create() method to produce the Engine.
     The strategies themselves are instances of EngineStrategy, and the built in 
     ones are present in the sqlalchemy.engine.strategies module.  Current implementations
-    include "plain" and "threadlocal".  The default used by this function is "threadlocal".
+    include "plain" and "threadlocal".  The default used by this function is "plain".
     
     "plain" provides support for a Connection object which can be used to execute SQL queries 
     with a specific underlying DBAPI connection.
index e08965ce1c77b29b655861aaf1e52482ece59f95..e284ebf3245af09fd7a169c35577829ea8185792 100644 (file)
@@ -108,7 +108,7 @@ class UOWDumper(unitofwork.UOWExecutor):
         super(UOWDumper, self).execute_per_element_childtasks(trans, task, isdelete)
 
     def execute_element_childtasks(self, trans, element, isdelete):
-        self.header("%s subelements of UOWTaskElement(%s)" % ((isdelete and "Delete" or "Save"), id(element)))
+        self.header("%s subelements of UOWTaskElement(%s)" % ((isdelete and "Delete" or "Save"), hex(id(element))))
         super(UOWDumper, self).execute_element_childtasks(trans, element, isdelete)
         self.closeheader()
         
@@ -122,7 +122,7 @@ class UOWDumper(unitofwork.UOWExecutor):
             self.buf.write(self._indent() + "   |- %s attribute on %s (UOWDependencyProcessor(%d) processing %s)\n" % (
                 repr(proc.processor.key), 
                     ("%s's to be %s" % (self._repr_task_class(proc.targettask), deletes and "deleted" or "saved")),
-                id(proc), 
+                hex(id(proc)), 
                 self._repr_task(proc.targettask))
             )
         elif False:
@@ -143,11 +143,11 @@ class UOWDumper(unitofwork.UOWExecutor):
             objid = "(placeholder)"
         else:
             if attribute is not None:
-                objid = "%s(%d).%s" % (te.obj.__class__.__name__, id(te.obj), attribute)
+                objid = "%s(%s).%s" % (te.obj.__class__.__name__, hex(id(te.obj)), attribute)
             else:
-                objid = "%s(%d)" % (te.obj.__class__.__name__, id(te.obj))
+                objid = "%s(%s)" % (te.obj.__class__.__name__, hex(id(te.obj)))
         if self.verbose:
-            return "%s (UOWTaskElement(%d, %s))" % (objid, id(te), (te.listonly and 'listonly' or (te.isdelete and 'delete' or 'save')))
+            return "%s (UOWTaskElement(%s, %s))" % (objid, hex(id(te)), (te.listonly and 'listonly' or (te.isdelete and 'delete' or 'save')))
         elif process:
             return "Process %s" % (objid)
         else:
@@ -162,9 +162,9 @@ class UOWDumper(unitofwork.UOWExecutor):
         else:
             name = '(none)'
         if task.circular_parent:
-            return ("UOWTask(%d->%d, %s)" % (id(task.circular_parent), id(task), name))
+            return ("UOWTask(%s->%s, %s)" % (hex(id(task.circular_parent)), hex(id(task)), name))
         else:
-            return ("UOWTask(%d, %s)" % (id(task), name))
+            return ("UOWTask(%s, %s)" % (hex(id(task)), name))
         
     def _repr_task_class(self, task):
         if task.mapper is not None and task.mapper.__class__.__name__ == 'Mapper':
@@ -173,7 +173,7 @@ class UOWDumper(unitofwork.UOWExecutor):
             return '(none)'
 
     def _repr(self, obj):
-        return "%s(%d)" % (obj.__class__.__name__, id(obj))
+        return "%s(%s)" % (obj.__class__.__name__, hex(id(obj)))
 
     def _indent(self):
         return "   |" * self.indent
index 5fffb4ae744891bcdc4165ed84da0b60c7853c6e..9af594a98b6f8f5b1f5d856bc9d9f96744cbbbd0 100644 (file)
@@ -1,4 +1,5 @@
 from testbase import PersistTest
+import testbase
 import sqlalchemy.engine.url as url
 from sqlalchemy import *
 import unittest
@@ -87,5 +88,5 @@ class MockCursor(object):
 mock_dbapi = MockDBAPI()
             
 if __name__ == "__main__":
-    unittest.main()
+    testbase.main()
         
\ No newline at end of file