def __init__(self, client, options, execution_context, query_execution_info): """ Constructor """ super(_PipelineExecutionContext, self).__init__(client, options) if options.get("maxItemCount"): self._page_size = options["maxItemCount"] else: self._page_size = _PipelineExecutionContext.DEFAULT_PAGE_SIZE self._execution_context = execution_context self._endpoint = endpoint_component._QueryExecutionEndpointComponent( execution_context) order_by = query_execution_info.get_order_by() if order_by: self._endpoint = endpoint_component._QueryExecutionOrderByEndpointComponent( self._endpoint) top = query_execution_info.get_top() if top is not None: self._endpoint = endpoint_component._QueryExecutionTopEndpointComponent( self._endpoint, top) aggregates = query_execution_info.get_aggregates() if aggregates: self._endpoint = endpoint_component._QueryExecutionAggregateEndpointComponent( self._endpoint, aggregates)
def __init__(self, client, options, execution_context, query_execution_info): """ Constructor """ super(_PipelineExecutionContext, self).__init__(client, options) if options.get("maxItemCount"): self._page_size = options["maxItemCount"] else: self._page_size = _PipelineExecutionContext.DEFAULT_PAGE_SIZE self._execution_context = execution_context self._endpoint = endpoint_component._QueryExecutionEndpointComponent( execution_context) order_by = query_execution_info.get_order_by() if order_by: self._endpoint = endpoint_component._QueryExecutionOrderByEndpointComponent( self._endpoint) aggregates = query_execution_info.get_aggregates() if aggregates: self._endpoint = endpoint_component._QueryExecutionAggregateEndpointComponent( self._endpoint, aggregates) offset = query_execution_info.get_offset() if offset is not None: self._endpoint = endpoint_component._QueryExecutionOffsetEndpointComponent( self._endpoint, offset) top = query_execution_info.get_top() if top is not None: self._endpoint = endpoint_component._QueryExecutionTopEndpointComponent( self._endpoint, top) limit = query_execution_info.get_limit() if limit is not None: self._endpoint = endpoint_component._QueryExecutionTopEndpointComponent( self._endpoint, limit) distinct_type = query_execution_info.get_distinct_type() if distinct_type != _DistinctType.NoneType: if distinct_type == _DistinctType.Ordered: self._endpoint = endpoint_component._QueryExecutionDistinctOrderedEndpointComponent( self._endpoint) else: self._endpoint = endpoint_component._QueryExecutionDistinctUnorderedEndpointComponent( self._endpoint)