Esempio 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 AsyncLazyDatastoreQuery RunQueryLazilyAsync(
            GqlQuery gqlQuery,
            ReadConsistency?readConsistency = null,
            CallSettings callSettings       = null)
        {
            GaxPreconditions.CheckNotNull(gqlQuery, nameof(gqlQuery));
            var request = new RunQueryRequest
            {
                ProjectId   = ProjectId,
                PartitionId = _partitionId,
                GqlQuery    = gqlQuery,
                ReadOptions = GetReadOptions(readConsistency)
            };
            var streamer = new QueryStreamer(request, Client.RunQueryApiCall, callSettings);

            return(new AsyncLazyDatastoreQuery(streamer.Async()));
        }