This extension adds a record resource. Record
resource doesn't provide any API. Its main purpose is to record other resources relationship metadata.
Extensions installation instructions
Record is the object with fields:
- type — string or number, type of the record.
- sid — string or number, subject id
- oid — string or number, optional, object id
- ts — record timestamp
- data — any, optional data
No API
Adds a record. Available options:
- type — string or number, type of the record.
- sid — string or number, subject id
- oid — string or number, optional, object id
- data — any, data to add to the record
- update — boolean, if true and a record already exists it will update the timestamp of the record
Returns a record with id
Returns all the records for the options. New records first. Available options:
- type — selects records by type
- sid — selects records with subject id
- oid — also filters records with object id
- limit — limits result number
Checks if the record of type
and with subject sid
and/or object oid
is available. Return true
or false
.
- type — record type
- sid — record subject id
- oid — record object id
Deletes a record
- type — record type
- sid — record subject id
- oid — record object id
Deletes all the records where sid
or oid
is equal to id
(slow method)
Records search (slow method)
- type — with type
- sid — with sid
- oid — with oid
- sample — number, return a random number of records
- limit — limits results number
- count — counts the number of records
Last three options are exclusive.
License: MIT.