]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Mapped char_length to the LEN() function for mssql.
authorMichael Trier <mtrier@gmail.com>
Fri, 2 Jan 2009 18:25:04 +0000 (18:25 +0000)
committerMichael Trier <mtrier@gmail.com>
Fri, 2 Jan 2009 18:25:04 +0000 (18:25 +0000)
CHANGES
lib/sqlalchemy/databases/mssql.py

diff --git a/CHANGES b/CHANGES
index 116751902690ee6d3edda638e64486b93ce27580..cdfe4617a038060da7234ff7fb75007a7b34bd6c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -272,6 +272,8 @@ CHANGES
       new doc section "Custom Comparators".
     
 - mssql
+    - Mapped ``char_length`` to the ``LEN()`` function.
+
     - If an ``INSERT`` includes a subselect the ``INSERT`` is
       converted from an ``INSERT INTO VALUES`` construct to a
       ``INSERT INTO SELECT`` construct.
index 5ad2a93069ff2e78ccb6d6bd51eaf423ed4aafa8..963b0e5fec43c12e765eb549fb0ebc0cb095c6c0 100644 (file)
@@ -1377,7 +1377,8 @@ class MSSQLCompiler(compiler.DefaultCompiler):
         {
             sql_functions.now: 'CURRENT_TIMESTAMP',
             sql_functions.current_date: 'GETDATE()',
-            'length': lambda x: "LEN(%s)" % x
+            'length': lambda x: "LEN(%s)" % x,
+            sql_functions.char_length: lambda x: "LEN(%s)" % x
         }
     )