Checks the existance of data.
Optional
data: unknownChecks whether value
is less than or equal to (i.e. <=) the query
.
Optional
data: unknownChecks whether value
is greater than or equal to (i.e. >=) the query
.
Optional
data: unknownCasts data. This function is used by getters to cast an object to document instances. If the value is null, the default value will be returned.
Optional
value: unknownOptional
data: unknownCompares data. This function is used when sorting.
Parses data. This function is used when restoring data from database files.
Checks the existance of data.
Optional
data: unknownChecks whether value
is greater than (i.e. >) the query
.
Optional
data: unknownChecks whether value
is greater than or equal to (i.e. >=) the query
.
Optional
data: unknownChecks whether value
is equal to one of elements in query
.
Optional
data: unknownChecks whether value
is less than (i.e. <) the query
.
Optional
data: unknownChecks whether value
is less than or equal to (i.e. <=) the query
.
Optional
data: unknownChecks the equality of data. Returns true if the value doesn't match.
Optional
data: unknownChecks whether value
is not equal to any elements in query
.
Optional
data: unknownRenames a field.
Validates data. This function is used by setters.
Optional
data: unknownTransforms value. This function is used when saving data to database files.
Optional
data: unknown
This is the basic schema type. All schema types should inherit from this class. For example:
Query operators
To add a query operator, defines a method whose name is started with
q$
. For example:The
value
parameter is the value of specified field; thequery
parameter is the value passed to the query operator; thedata
parameter is the complete data.The return value must be a boolean indicating whether the data passed.
Update operators
To add a update operator, defines a method whose name is started with
u$
. For example:The
value
parameter is the value of specified field; theupdate
parameter is the value passed to the update operator; thedata
parameter is the complete data.The return value will replace the original data.