Example #1
0
        public void QueryTotals(AggregationPool pool)
        {
            int attrLen            = Index.Length;
            List <Attribute> index = new List <Attribute>();

            for (int i = 0; i < attrLen - 1; i++)
            {
                index.Add(Index[i]);
                Aggregation agg = pool.FindAggregation(index.ToArray());
                if (agg != null)
                {
                    foreach (int row in TotalIndices)
                    {
                        AttributeMember[] tuple = Tuples[row];
                        if (!tuple[i].IsTotal && tuple[i + 1].IsTotal)
                        {
                            int targetIndex = agg.GetIndex(tuple.Take(i + 1));
                            if (targetIndex >= 0)
                            {
                                for (int j = 0; j < Values.Count; j++)
                                {
                                    Values[j].Values[row] = agg.Values[j].Values[targetIndex];
                                }
                            }
                        }
                    }
                }
            }
        }
Example #2
0
 public Query(AggregationPool pool, IDbConnection connection)
 {
     _pool       = pool;
     _connection = connection;
 }
Example #3
0
 public Joiner(AggregationPool pool, IDbConnection connection, QueryCommand cmd) : base(connection)
 {
     _pool       = pool;
     _connection = connection;
     _cmd        = cmd;
 }