]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix to parameter thing in insert
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 20 Dec 2005 05:27:13 +0000 (05:27 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 20 Dec 2005 05:27:13 +0000 (05:27 +0000)
added unicodetype to __all__ for types

lib/sqlalchemy/ansisql.py
lib/sqlalchemy/engine.py
lib/sqlalchemy/types.py

index 2cb5e5301b51e5886da4515f7122f79f8d36f018..795a2545b0cf934335f569b3c2e1a17d8d181c46 100644 (file)
@@ -360,7 +360,7 @@ class ANSICompiler(sql.Compiled):
                 self.visit_insert_sequence(c, seq)
         vis = DefaultVisitor()
         for c in insert_stmt.table.c:
-            if self.parameters.get(c.key, None) is None and c.default is not None:
+            if (self.parameters is None or self.parameters.get(c.key, None) is None) and c.default is not None:
                 c.default.accept_visitor(vis)
         
         self.isinsert = True
index 81d72b17b2da65af7b462457b58ed4b8ab39f198..349bb4d1d6da3bc30d8c9913a1a034a4bf41c265 100644 (file)
@@ -381,7 +381,7 @@ class SQLEngine(schema.SchemaEngine):
         self.post_exec(proxy, compiled, parameters, **kwargs)
         return ResultProxy(cursor, self, typemap=compiled.typemap)
 
-    def execute(self, statement, parameters, connection=None, cursor=None, echo = None, typemap = None, commit=False, **kwargs):
+    def execute(self, statement, parameters, connection=None, cursor=None, echo=None, typemap=None, commit=False, **kwargs):
         """executes the given string-based SQL statement with the given parameters.  
 
         The parameters can be a dictionary or a list, or a list of dictionaries or lists, depending
index a35e663b05f8c9cb5c8ae1c64fbd0b1fddfa04d9..ee051368176ed66d752cd5416dbcdccbac111aec 100644 (file)
@@ -17,7 +17,7 @@
 
 __all__ = [ 'TypeEngine', 'TypeDecorator', 'NullTypeEngine',
             'INT', 'CHAR', 'VARCHAR', 'TEXT', 'FLOAT', 'DECIMAL', 
-            'TIMESTAMP', 'DATETIME', 'CLOB', 'BLOB', 'BOOLEAN', 'String', 'Integer', 'Numeric', 'Float', 'DateTime', 'Binary', 'Boolean', 'NULLTYPE'
+            'TIMESTAMP', 'DATETIME', 'CLOB', 'BLOB', 'BOOLEAN', 'String', 'Integer', 'Numeric', 'Float', 'DateTime', 'Binary', 'Boolean', 'Unicode', 'NULLTYPE'
             ]