Ejemplo n.º 1
0
        /// <inheritdoc />
        public override AsyncLazyDatastoreQuery RunQueryLazilyAsync(Query query, CallSettings callSettings = null)
        {
            GaxPreconditions.CheckNotNull(query, nameof(query));
            var request = new RunQueryRequest
            {
                ProjectId   = _projectId,
                PartitionId = _partitionId,
                Query       = query,
                ReadOptions = _readOptions
            };
            var streamer = new QueryStreamer(request, _client.RunQueryApiCall, callSettings);

            return(new AsyncLazyDatastoreQuery(streamer.Async()));
        }
        /// <inheritdoc/>
        public override LazyDatastoreQuery RunQueryLazily(
            Query query,
            ReadConsistency?readConsistency = null,
            CallSettings callSettings       = null)
        {
            GaxPreconditions.CheckNotNull(query, nameof(query));
            var request = new RunQueryRequest
            {
                ProjectId   = ProjectId,
                PartitionId = _partitionId,
                Query       = query,
                ReadOptions = GetReadOptions(readConsistency)
            };
            var streamer = new QueryStreamer(request, Client.RunQueryApiCall, callSettings);

            return(new LazyDatastoreQuery(streamer.Sync()));
        }
Ejemplo n.º 3
0
 public AsyncQueryEnumerator(QueryStreamer _parent)
 {
     this._parent = _parent;
     _request     = _parent._initialRequest.Clone();
 }
Ejemplo n.º 4
0
 internal AsyncQueryEnumerable(QueryStreamer parent)
 {
     _parent = parent;
 }