protected override string CqlString() { var visitor = new CqlExpressionVisitor(); visitor.Evaluate(Expression); return(visitor.GetCount()); }
public new Task <TEntity> ExecuteAsync() { bool withValues = GetTable().GetSession().BinaryProtocolVersion > 1; var visitor = new CqlExpressionVisitor(); visitor.Evaluate(Expression); object[] values; string cql = visitor.GetCount(out values, withValues); var adaptation = InternalExecuteAsync(cql, values).ContinueWith((t) => { var rs = t.Result; var result = default(TEntity); var row = rs.FirstOrDefault(); if (row != null) { result = (TEntity)row[0]; } return(result); }, TaskContinuationOptions.ExecuteSynchronously); return(adaptation); }
protected override string GetCql(out object[] values) { var visitor = new CqlExpressionVisitor(); visitor.Evaluate(Expression); return(visitor.GetCount(out values)); }
protected override string GetCql(out object[] values) { var visitor = new CqlExpressionVisitor(PocoData, Table.Name, Table.KeyspaceName); visitor.Evaluate(Expression); return(visitor.GetCount(out values)); }
public override IAsyncResult BeginExecute(AsyncCallback callback, object state) { var visitor = new CqlExpressionVisitor(); visitor.Evaluate(Expression); return(InternalBeginExecute(visitor.GetCount(), visitor.Mappings, visitor.Alter, callback, state)); }
public override string ToString() { var visitor = new CqlExpressionVisitor(); visitor.Evaluate(Expression); object[] _; return(visitor.GetCount(out _, false)); }
public override IAsyncResult BeginExecute(AsyncCallback callback, object state) { bool withValues = GetTable().GetSession().BinaryProtocolVersion > 1; var visitor = new CqlExpressionVisitor(); visitor.Evaluate(Expression); object[] values; string cql = visitor.GetCount(out values, withValues); return(InternalBeginExecute(cql, values, visitor.Mappings, visitor.Alter, callback, state)); }