Пример #1
0
        /// <inheritdoc />
        public long DeleteAmortizations(IQueryCompunded <IDistributedQueryAtom> filter)
        {
            var res = m_Amortizations.DeleteMany(filter.Accept(new MongoDbNativeDistributed <Amortization>()));

            return(res.DeletedCount);
        }
Пример #2
0
 /// <inheritdoc />
 public IEnumerable <Amortization> SelectAmortizations(IQueryCompunded <IDistributedQueryAtom> filter) =>
 m_Amortizations.FindSync(filter.Accept(new MongoDbNativeDistributed <Amortization>()))
 .ToEnumerable();
Пример #3
0
 /// <inheritdoc />
 public IEnumerable <Asset> SelectAssets(IQueryCompunded <IDistributedQueryAtom> filter) =>
 m_Assets.FindSync(filter.Accept(new MongoDbNativeDistributed <Asset>()))
 .ToEnumerable();
Пример #4
0
        /// <inheritdoc />
        public long DeleteVouchers(IQueryCompunded <IVoucherQueryAtom> query)
        {
            var res = m_Vouchers.DeleteMany(query.Accept(new MongoDbNativeVoucher()));

            return(res.DeletedCount);
        }
Пример #5
0
 /// <inheritdoc />
 public IEnumerable <Voucher> SelectVouchers(IQueryCompunded <IVoucherQueryAtom> query) =>
 m_Vouchers.Find(query.Accept(new MongoDbNativeVoucher())).Sort(Builders <Voucher> .Sort.Ascending("date"))
 .ToEnumerable();
Пример #6
0
 /// <summary>
 ///     判断一般检索式是否成立
 /// </summary>
 /// <param name="query">检索式</param>
 /// <param name="atomPredictor">原子检索式成立条件</param>
 /// <returns>是否成立</returns>
 public static bool IsMatch <TAtom>(IQueryCompunded <TAtom> query, Func <TAtom, bool> atomPredictor)
     where TAtom : class => query?.Accept(new MatchHelperVisitor <TAtom>(atomPredictor)) ?? true;