something went wrong with VCS, trying fix it
This commit is contained in:
+12
-2
@@ -4719,12 +4719,17 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
|
||||
"text and blob field types not allowed in projection queries")
|
||||
else:
|
||||
projection.append(f.name)
|
||||
elif args_get('filterfields') == True:
|
||||
projection = []
|
||||
for f in fields:
|
||||
projection.append(f.name)
|
||||
|
||||
# projection's can't include 'id'.
|
||||
# real projection's can't include 'id'.
|
||||
# it will be added to the result later
|
||||
query_projection = [
|
||||
p for p in projection if \
|
||||
p != db[tablename]._id.name] if projection \
|
||||
p != db[tablename]._id.name] if projection and \
|
||||
args_get('projection') == True\
|
||||
else None
|
||||
|
||||
cursor = None
|
||||
@@ -4802,6 +4807,11 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
|
||||
what is accepted imposed by GAE: each field must be indexed,
|
||||
projection queries cannot contain blob or text fields, and you
|
||||
cannot use == and also select that same field. see https://developers.google.com/appengine/docs/python/datastore/queries#Query_Projection
|
||||
- optional attribute 'filterfields' when set to True web2py will only
|
||||
parse the explicitly listed fields into the Rows object, even though
|
||||
all fields are returned in the query. This can be used to reduce
|
||||
memory usage in cases where true projection queries are not
|
||||
usable.
|
||||
- optional attribute 'reusecursor' allows use of cursor with queries
|
||||
that have the limitby attribute. Set the attribute to True for the
|
||||
first query, set it to the value of db['_lastcursor'] to continue
|
||||
|
||||
+6
-3
@@ -706,17 +706,20 @@ class IS_INT_IN_RANGE(Validator):
|
||||
self.minimum = self.maximum = None
|
||||
if minimum is None:
|
||||
if maximum is None:
|
||||
self.error_message = error_message or 'enter an integer'
|
||||
self.error_message = translate(
|
||||
error_message or 'enter an integer')
|
||||
else:
|
||||
self.maximum = int(maximum)
|
||||
if error_message is None:
|
||||
error_message = 'enter an integer less than or equal to %(max)g'
|
||||
error_message = \
|
||||
'enter an integer less than or equal to %(max)g'
|
||||
self.error_message = translate(
|
||||
error_message) % dict(max=self.maximum - 1)
|
||||
elif maximum is None:
|
||||
self.minimum = int(minimum)
|
||||
if error_message is None:
|
||||
error_message = 'enter an integer greater than or equal to %(min)g'
|
||||
error_message = \
|
||||
'enter an integer greater than or equal to %(min)g'
|
||||
self.error_message = translate(
|
||||
error_message) % dict(min=self.minimum)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user