Example #1
0
        public ResultSet <T> Enumerate()
        {
            var paritionsAndMaxVals =
                _transactionContext.ReadPartitions.Select(p => Tuple.Create(p,
                                                                            _transactionContext.GetRowCount(p.PartitionID)));

            var ids = paritionsAndMaxVals.SelectMany(i => CreateRange(i.Item1.PartitionID, i.Item2));

            return(ResultSetFactory.Create <T>(ids, _transactionContext));
        }
Example #2
0
        public ResultSet <T> All()
        {
            var paritionsAndMaxVals =
                _transactionContext.ReadPartitions.Select(p => Tuple.Create(p,
                                                                            _transactionContext.GetRowCount(p.PartitionID))).ToArray();

            long count = paritionsAndMaxVals.Sum(i => i.Item2);
            var  ids   = paritionsAndMaxVals.SelectMany(i => CreateRange(i.Item1.PartitionID, i.Item2));

            return(ResultSetFactory.Create <T>(ids, _transactionContext, count));
        }
Example #3
0
        public ResultSet <T> AllBySymbolValueOverInterval <TT>(string symbol, TT value, DateInterval interval)
        {
            var column              = _journal.Metadata.GetColumnByPropertyName(symbol);
            var intervalFilter      = new PartitionIntervalIterator();
            var symbolFilter        = new SymbolFilter <TT>(column, value);
            var parititionsFiltered = intervalFilter.IteratePartitions(
                _transactionContext.ReverseReadPartitions, interval, _transactionContext);
            var ids = symbolFilter.Filter(parititionsFiltered, _transactionContext, ERowIDSortDirection.Desc);

            return(ResultSetFactory.Create <T>(ids, _transactionContext));
        }