MojErr MojDbQuotaTest::getQuotaUsage(MojDb& db, const MojChar* owner, MojInt64& usageOut) { MojInt64 size; MojErr err = db.quotaEngine()->quotaUsage(owner, size, usageOut); MojTestErrCheck(err); return MojErrNone; }
MojErr MojDbQuotaTest::getKindUsage(MojDb& db, const MojChar* kindId, MojInt64& usageOut) { MojRefCountedPtr<MojDbStorageTxn> txn; MojErr err = db.storageEngine()->beginTxn(txn); MojTestErrCheck(err); err = db.quotaEngine()->kindUsage(kindId, usageOut, txn.get()); MojTestErrCheck(err); return MojErrNone; }
void getQuotaUsage(MojDb& db, const MojChar* owner, MojInt64& usageOut) { MojInt64 size; MojAssertNoErr( db.quotaEngine()->quotaUsage(owner, size, usageOut) ); }
void getKindUsage(MojDb& db, const MojChar* kindId, MojInt64& usageOut) { MojRefCountedPtr<MojDbStorageTxn> txn; MojAssertNoErr( db.storageEngine()->beginTxn(txn) ); MojAssertNoErr( db.quotaEngine()->kindUsage(kindId, usageOut, txn.get()) ); }