grid(user_cursor=False) by default because it is broken
This commit is contained in:
+6
-4
@@ -1967,7 +1967,8 @@ class SQLFORM(FORM):
|
|||||||
cache_count=None,
|
cache_count=None,
|
||||||
client_side_delete=False,
|
client_side_delete=False,
|
||||||
ignore_common_filters=None,
|
ignore_common_filters=None,
|
||||||
auto_pagination=True):
|
auto_pagination=True,
|
||||||
|
use_cursor=False):
|
||||||
|
|
||||||
formstyle = formstyle or current.response.formstyle
|
formstyle = formstyle or current.response.formstyle
|
||||||
|
|
||||||
@@ -2542,7 +2543,7 @@ class SQLFORM(FORM):
|
|||||||
|
|
||||||
cursor = True
|
cursor = True
|
||||||
# figure out what page we are one to setup the limitby
|
# figure out what page we are one to setup the limitby
|
||||||
if paginate and dbset._db._adapter.dbengine == 'google:datastore':
|
if paginate and dbset._db._adapter.dbengine == 'google:datastore' and use_cursor:
|
||||||
cursor = request.vars.cursor or True
|
cursor = request.vars.cursor or True
|
||||||
limitby = (0, paginate)
|
limitby = (0, paginate)
|
||||||
try:
|
try:
|
||||||
@@ -2564,7 +2565,7 @@ class SQLFORM(FORM):
|
|||||||
table_fields = [field for field in fields
|
table_fields = [field for field in fields
|
||||||
if (field.tablename in tablenames and
|
if (field.tablename in tablenames and
|
||||||
not(isinstance(field, Field.Virtual)))]
|
not(isinstance(field, Field.Virtual)))]
|
||||||
if dbset._db._adapter.dbengine == 'google:datastore':
|
if dbset._db._adapter.dbengine == 'google:datastore' and use_cursor:
|
||||||
rows = dbset.select(left=left, orderby=orderby,
|
rows = dbset.select(left=left, orderby=orderby,
|
||||||
groupby=groupby, limitby=limitby,
|
groupby=groupby, limitby=limitby,
|
||||||
reusecursor=cursor,
|
reusecursor=cursor,
|
||||||
@@ -2574,6 +2575,7 @@ class SQLFORM(FORM):
|
|||||||
rows = dbset.select(left=left, orderby=orderby,
|
rows = dbset.select(left=left, orderby=orderby,
|
||||||
groupby=groupby, limitby=limitby,
|
groupby=groupby, limitby=limitby,
|
||||||
cacheable=True, *table_fields)
|
cacheable=True, *table_fields)
|
||||||
|
next_cursor = None
|
||||||
except SyntaxError:
|
except SyntaxError:
|
||||||
rows = None
|
rows = None
|
||||||
next_cursor = None
|
next_cursor = None
|
||||||
@@ -2592,7 +2594,7 @@ class SQLFORM(FORM):
|
|||||||
console.append(DIV(message or '', _class='web2py_counter'))
|
console.append(DIV(message or '', _class='web2py_counter'))
|
||||||
|
|
||||||
paginator = UL()
|
paginator = UL()
|
||||||
if paginate and dbset._db._adapter.dbengine == 'google:datastore':
|
if paginate and dbset._db._adapter.dbengine == 'google:datastore' and use_cursor:
|
||||||
# this means we may have a large table with an unknown number of rows.
|
# this means we may have a large table with an unknown number of rows.
|
||||||
try:
|
try:
|
||||||
page = int(request.vars.page or 1) - 1
|
page = int(request.vars.page or 1) - 1
|
||||||
|
|||||||
Reference in New Issue
Block a user