public override FeedIterator GetItemQueryStreamIterator(
     QueryDefinition queryDefinition,
     string continuationToken           = null,
     QueryRequestOptions requestOptions = null)
 {
     return(this.GetItemQueryStreamIteratorInternal(
                sqlQuerySpec: queryDefinition?.ToSqlQuerySpec(),
                isContinuationExcpected: true,
                continuationToken: continuationToken,
                requestOptions: requestOptions));
 }
        FeedIterator GetItemQueryStreamIterator(
            FeedRange feedRange,
            QueryDefinition queryDefinition,
            string continuationToken           = null,
            QueryRequestOptions requestOptions = null)
        {
            FeedRangeInternal feedRangeInternal = feedRange as FeedRangeInternal;

            return(this.GetItemQueryStreamIteratorInternal(
                       sqlQuerySpec: queryDefinition?.ToSqlQuerySpec(),
                       isContinuationExcpected: true,
                       continuationToken: continuationToken,
                       feedRange: feedRangeInternal,
                       requestOptions: requestOptions));
        }
 public FeedIteratorCore(
     CosmosClientContext clientContext,
     Uri resourceLink,
     ResourceType resourceType,
     QueryDefinition queryDefinition,
     string continuationToken,
     QueryRequestOptions options)
 {
     this.resourceLink           = resourceLink;
     this.clientContext          = clientContext;
     this.resourceType           = resourceType;
     this.querySpec              = queryDefinition?.ToSqlQuerySpec();
     this.ContinuationToken      = continuationToken;
     this.requestOptions         = options;
     this.hasMoreResultsInternal = true;
 }
        FeedIterator GetItemQueryStreamIterator(
            FeedToken feedToken,
            QueryDefinition queryDefinition,
            QueryRequestOptions requestOptions = null)
        {
            if (feedToken is FeedTokenInternal feedTokenInternal)
            {
                return(this.GetItemQueryStreamIteratorInternal(
                           sqlQuerySpec: queryDefinition?.ToSqlQuerySpec(),
                           isContinuationExcpected: true,
                           continuationToken: null,
                           feedToken: feedTokenInternal,
                           requestOptions: requestOptions));
            }

            throw new ArgumentException(nameof(feedToken), ClientResources.FeedToken_InvalidImplementation);
        }
Esempio n. 5
0
 private FeedRangeIteratorCore(
     ContainerInternal containerCore,
     QueryRequestOptions options,
     ResourceType resourceType,
     QueryDefinition queryDefinition)
 {
     this.containerCore          = containerCore ?? throw new ArgumentNullException(nameof(containerCore));
     this.clientContext          = containerCore.ClientContext;
     this.queryRequestOptions    = options;
     this.hasMoreResultsInternal = true;
     this.resourceType           = resourceType;
     this.querySpec        = queryDefinition?.ToSqlQuerySpec();
     this.lazyContainerRid = new AsyncLazy <TryCatch <string> >(valueFactory: (innerCancellationToken) =>
     {
         return(this.TryInitializeContainerRIdAsync(innerCancellationToken));
     });
 }
Esempio n. 6
0
 internal FeedIteratorCore(
     CosmosClientContext clientContext,
     Uri resourceLink,
     ResourceType resourceType,
     QueryDefinition queryDefinition,
     string continuationToken,
     QueryRequestOptions options,
     bool usePropertySerializer = false)
 {
     this.resourceLink           = resourceLink;
     this.clientContext          = clientContext;
     this.resourceType           = resourceType;
     this.querySpec              = queryDefinition?.ToSqlQuerySpec();
     this.continuationToken      = continuationToken;
     this.requestOptions         = options;
     this.usePropertySerializer  = usePropertySerializer;
     this.hasMoreResultsInternal = true;
 }
 private FeedIteratorCore(
     ContainerCore containerCore,
     CosmosClientContext clientContext,
     Uri resourceLink,
     ResourceType resourceType,
     QueryDefinition queryDefinition,
     string continuationToken,
     FeedTokenInternal feedTokenInternal,
     QueryRequestOptions options)
 {
     this.resourceLink = resourceLink;
     this.containerCore = containerCore;
     this.clientContext = clientContext;
     this.resourceType = resourceType;
     this.querySpec = queryDefinition?.ToSqlQuerySpec();
     this.feedTokenInternal = feedTokenInternal;
     this.ContinuationToken = continuationToken ?? this.feedTokenInternal?.GetContinuation();
     this.requestOptions = options;
     this.hasMoreResultsInternal = true;
 }