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 getKindUsage(MojDb& db, const MojChar* kindId, MojInt64& usageOut) { MojRefCountedPtr<MojDbStorageTxn> txn; MojAssertNoErr( db.storageEngine()->beginTxn(txn) ); MojAssertNoErr( db.quotaEngine()->kindUsage(kindId, usageOut, txn.get()) ); }