]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
regexp searches for negative decimals too
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 16 Jul 2007 21:35:46 +0000 (21:35 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 16 Jul 2007 21:35:46 +0000 (21:35 +0000)
lib/sqlalchemy/ansisql.py

index 32c6e7ac483c419e82b09bc2ca3627cca7a27943..3e6ddd34c5e98d3c685372f9fb0be5b4b4d27da2 100644 (file)
@@ -449,7 +449,7 @@ class ANSICompiler(engine.Compiled):
                 self.generated_ids['anonymous'] = anonymous_counter + 1
                 self.generated_ids[('anonymous', ident)] = newname
                 return newname
-        return re.sub(r'{ANON (\d+) (.*)}', anon, name)
+        return re.sub(r'{ANON (-?\d+) (.*)}', anon, name)
             
     def bindparam_string(self, name):
         return self.bindtemplate % name