def rpc_init(self, raw_query): rpc = UserRPC('datastore_v3', self._deadline) rpc.callback = lambda : self.rpc_callback(rpc) rpc.make_call( 'RunQuery', raw_query._ToPb(self._limit, self._offset, self._limit), QueryResult() ) self.add_callback(rpc.check_success)
def rpc_next(self, request): rpc = UserRPC('datastore_v3', self._deadline) rpc.callback = lambda : self.rpc_callback(rpc) rpc.make_call('Next', request, QueryResult()) self.add_callback(rpc.check_success)