moor icon indicating copy to clipboard operation
moor copied to clipboard

ownership_quota support

Open github-actions[bot] opened this issue 4 months ago • 0 comments

If the intended owner of the new object has a property named `ownership_quota' and the value of that property is an integer, then `create()' treats that value

as a "quota". If the quota is less than or equal to zero, then the quota is considered to be exhausted and `create()' raises `E_QUOTA' instead of creating an

object. Otherwise, the quota is decremented and stored back into the `ownership_quota' property as a part of the creation of the new object.

https://github.com/rdaum/moor/blob/47435a1442a1f5532c23944029e90982baa99bff/crates/db/src/db_worldstate.rs#L109



        let owner = (owner != NOTHING).then_some(owner);

        // TODO: ownership_quota support
        //    If the intended owner of the new object has a property named `ownership_quota' and the value of that property is an integer, then `create()' treats that value
        //    as a "quota".  If the quota is less than or equal to zero, then the quota is considered to be exhausted and `create()' raises `E_QUOTA' instead of creating an
        //    object.  Otherwise, the quota is decremented and stored back into the `ownership_quota' property as a part of the creation of the new object.

github-actions[bot] avatar Feb 10 '24 01:02 github-actions[bot]