Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IEnumerator <ICqlRow> GetEnumerator()
        {
            var cqlVersion = _provider.Context.ConnectionBuilder.CqlVersion;
            var result     = CqlQueryEvaluator.GetCql(Expression, cqlVersion);

            return(Provider.Context.ExecuteQuery(result).GetEnumerator());
        }
Пример #2
0
        public static string GetCql(Expression expression)
        {
            var eval = new CqlQueryEvaluator();

            eval.Evaluate(expression);

            return(eval.Query);
        }
        public static CqlQueryEvaluator <CompareWith> GetEvaluator <CompareWith>(Expression expression)
            where CompareWith : CassandraType
        {
            var eval = new CqlQueryEvaluator <CompareWith>();

            eval.Evaluate(expression);

            return(eval);
        }
Пример #4
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IEnumerator <T> GetEnumerator()
        {
            var result        = CqlQueryEvaluator.GetCql(Expression);
            var fluentObjects = _family.Context.ExecuteQuery(result);

            var serializer = ObjectSerializerFactory.Get(typeof(T));

            return(serializer
                   .Deserialize(fluentObjects)
                   .OfType <T>()
                   .GetEnumerator());
        }
Пример #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            var cqlVersion = _provider.Context.ConnectionBuilder.CqlVersion;

            return(CqlQueryEvaluator.GetCql(Expression, cqlVersion));
        }
Пример #6
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(CqlQueryEvaluator.GetCql(Expression));
 }
		public static string GetCql(Expression expression, string cqlVersion)
		{
			var eval = new CqlQueryEvaluator();
			eval._cqlVersion = cqlVersion;
			eval.Evaluate(expression);

			return eval.Query;
		}
Пример #8
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IEnumerator <ICqlRow <CompareWith> > GetEnumerator()
        {
            var result = CqlQueryEvaluator <CompareWith> .GetEvaluator <CompareWith>(Expression);

            return(Provider.Cql(result.Query).GetEnumerator());
        }
Пример #9
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(CqlQueryEvaluator <CompareWith> .GetCql <CompareWith>(Expression));
 }
Пример #10
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IEnumerator <ICqlRow> GetEnumerator()
        {
            var result = CqlQueryEvaluator.GetCql(Expression);

            return(Provider.Context.ExecuteQuery(result).GetEnumerator());
        }
        public static string GetCql(Expression expression, ObjectSerializerConventions conventions = null)
        {
            var eval = new CqlQueryEvaluator(conventions);
            eval.Evaluate(expression);

            return eval.Query;
        }
Пример #12
0
        private static CqlQueryEvaluator GetEvaluator(Expression expression)
        {
            var eval = new CqlQueryEvaluator();
            eval.Evaluate(expression);

            return eval;
        }