LENGTH fixed in MSSQL, thanks Denes

This commit is contained in:
Massimo Di Pierro
2012-04-17 09:55:50 -05:00
parent 6c052c4f07
commit 0d4a363a0c
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.7 (2012-04-16 08:15:36) dev
Version 1.99.7 (2012-04-17 09:54:49) dev
+5
View File
@@ -2535,6 +2535,11 @@ class MSSQLAdapter(BaseAdapter):
def PRIMARY_KEY(self,key):
return 'PRIMARY KEY CLUSTERED (%s)' % key
def AGGREGATE(self, first, what):
if what == 'LENGTH':
what = 'LEN'
return "%s(%s)" % (what, self.expand(first))
def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
if limitby:
(lmin, lmax) = limitby