diff --git a/VERSION b/VERSION index fccedd3e..5a1ea2e8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.0 (2012-12-04 10:55:53) rc1 +Version 2.3.0 (2012-12-04 18:29:48) rc1 diff --git a/gluon/contrib/paymentech.py b/gluon/contrib/paymentech.py index a372aa77..24dabbfc 100644 --- a/gluon/contrib/paymentech.py +++ b/gluon/contrib/paymentech.py @@ -6,6 +6,7 @@ # http://code.google.com/p/web2py/issues/detail?id=1170 # # Copyright (C) <2012> Alan Etkin +# Adnan Smajlovic # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gluon/dal.py b/gluon/dal.py index 37fb8d68..ca0493f2 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2978,6 +2978,7 @@ class MSSQLAdapter(BaseAdapter): 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 @@ -3119,6 +3120,17 @@ class MSSQLAdapter(BaseAdapter): return BaseAdapter.represent(self, obj, fieldtype) +class MSSQL3Adapter(MSSQLAdapter): + """ experimental support for pagination in MSSQL""" + def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby): + if limitby: + (lmin, lmax) = limitby + return 'SELECT %s FROM (SELECT %s ROW_NUMBER() over (order by id) AS w_row, %s FROM %s%s%s) TMP WHERE w_row BETWEEN %i AND %s;' % (sql_f,sql_s,sql_f,sql_t,sql_w,sql_o,lmin,lmax) + return 'SELECT %s %s FROM %s%s%s;' % (sql_s,sql_f,sql_t,sql_w,sql_o) + def rowslice(self,rows,minimum=0,maximum=None): + return rows + + class MSSQL2Adapter(MSSQLAdapter): drivers = ('pyodbc',)