Ejemplo n.º 1
0
        public static Aggregable CreateSum(params ColumnValue[] columns)
        {
            var result = new Aggregable();

            result._aggregableFunction = columns.Select(_ => _.ToSumColumn()).ToArray();
            result._columns            = new ColumnValue[0];
            return(result);
        }
Ejemplo n.º 2
0
        public int Count()
        {
            var countedEntity = Query.Entity;
            var columnValue   = Datastore.ToColumnValue(countedEntity, countedEntity.PrimaryKey.FieldName);

            SelectStatement = Aggregable.CreateColumnCount(columnValue);
            return(Datastore.ExecuteScalar(this));
        }
Ejemplo n.º 3
0
 public IEnumerable <AggregableResultRow> Sum(params ColumnValue[] columns)
 {
     SelectStatement = Aggregable.CreateSum(columns);
     return(Datastore.ExecuteQuery(this));
 }