public N1QlQueryModelVisitor(IMemberNameResolver memberNameResolver, IMethodCallTranslatorProvider methodCallTranslatorProvider,
     ITypeSerializer serializer, ILoggerFactory loggerFactory)
 {
     _loggerFactory = loggerFactory;
     Log = _loggerFactory.CreateLogger<N1QlQueryModelVisitor>();
     _queryPartsAggregator = new QueryPartsAggregator(_loggerFactory);
     _queryGenerationContext = new N1QlQueryGenerationContext()
     {
         //MemberNameResolver = new JsonNetMemberNameResolver(ClusterHelper.Get().Configuration.SerializationSettings.ContractResolver),
         //MethodCallTranslatorProvider = new DefaultMethodCallTranslatorProvider()
         MemberNameResolver = memberNameResolver,
         MethodCallTranslatorProvider = methodCallTranslatorProvider,
         Serializer = serializer
     };
 }
        /// <exception cref="ArgumentNullException"><paramref name="queryGenerationContext"/> is <see langword="null" />.</exception>
        public N1QlQueryModelVisitor(N1QlQueryGenerationContext queryGenerationContext, bool isSubQuery, ILoggerFactory loggerFactory)
        {
            _loggerFactory = loggerFactory;
            Log = _loggerFactory.CreateLogger<N1QlQueryModelVisitor>();
            _queryPartsAggregator = new QueryPartsAggregator(_loggerFactory);
            if (queryGenerationContext == null)
            {
                throw new ArgumentNullException("queryGenerationContext");
            }

            _queryGenerationContext = queryGenerationContext;
            _isSubQuery = isSubQuery;

            if (isSubQuery)
            {
                _queryPartsAggregator.QueryType = N1QlQueryType.Subquery;
            }
        }
Пример #3
0
 public CommandData(QueryPartsAggregator aggregator, IBucket bucket)
 {
     _aggregator = aggregator;
     _bucket     = bucket;
 }
Пример #4
0
 public CommandData(QueryPartsAggregator aggregator, IBucket bucket)
 {
     _aggregator = aggregator;
     _bucket = bucket;
 }
Пример #5
0
 /// <summary>
 /// Creates a new InnerNestDetectingExpressionVisitor.
 /// </summary>
 /// <param name="queyPartsAggregator"><see cref="QueryPartsAggregator"/> for the current query.</param>
 public InnerNestDetectingExpressionVisitor(QueryPartsAggregator queyPartsAggregator)
 {
     _queryPartsAggregator = queyPartsAggregator ?? throw new ArgumentNullException(nameof(queyPartsAggregator));
 }