google app engine GQL, How to do pagination with datetime with millisecond accuracy -
hi have issue on querying subsecond accuracy queries gql.. wondering if had similar issues or workarounds.
the context problem i'm loading batches of many objects google data store @ once. thousands of objects added within single second.
on retrieval, run pagination issue when i'd page based on datetime of when they're added. (the last added time ideal paging allows users data don't have.)
since batches of entities added in within sub second quantum. paging problematic if need start paging batch of entities inserted in same second.
seems app engine 1 box solution can't handle subsecond queries if try pass in datetime objects has fractions. i.e. have following query pass in datetime object fractions of second. locally i'm running python 2.6.
test = gqlquery("select * table lastupdated > :1", minimumtime)
if minimumtime 10:00:00.0500, result set still contain records lastupdated @ 10:00:00.0100, 10:00:00.0200 etc..
i'm thinking maybe workaround create own key format, needs autoincrementing. wanted see if there other simpler solutions i'm missing.
thanks, ning
don't paginate on datetime; instead, use cursors.
Comments
Post a Comment