Пример #1
0
MojErr MojDbQuotaTest::getQuotaUsage(MojDb& db, const MojChar* owner, MojInt64& usageOut)
{
	MojInt64 size;
	MojErr err = db.quotaEngine()->quotaUsage(owner, size, usageOut);
	MojTestErrCheck(err);

	return MojErrNone;
}
Пример #2
0
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;
}
Пример #3
0
 void getQuotaUsage(MojDb& db, const MojChar* owner, MojInt64& usageOut)
 {
     MojInt64 size;
     MojAssertNoErr( db.quotaEngine()->quotaUsage(owner, size, usageOut) );
 }
Пример #4
0
 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()) );
 }