Miembros
-
<private> _idField :string
-
Descripción
The name of the field that uniquely identifies a record. When provided, some operations will take advantage of it
Detalles
-
<private> _pkey :*
-
Descripción
The value of the primary key if documents/model#_idField is filled in. It will be null if none found
Detalles
-
isNew :boolean
-
Descripción
If documents/model#_idField is filled in and it's value is empty this will be true.
Detalles
-
isEmpty :boolean
-
Descripción
Returns true if this instance is empty
Detalles
Métodos
-
<static> get( path, record ) → {*}
-
Descripción
Reaches into an object and allows you to get at a value deeply nested in an object. This is not a query, but a
straight reach in, useful for event bindingsParámetros
Nombre Tipo Descripción patharray The split path of the element to work with
recordobject The record to reach into
Returns
Detalles
-
<static> set( path, record, setter, newValue )
-
Descripción
This will write the value into a record at the path, creating intervening objects if they don't exist. This does not work as filtered
update and is meant to be used on a single record. It is a nice way of setting a property at an arbitrary depth at will.Parámetros
Nombre Tipo Descripción patharray The split path of the element to work with
recordobject The record to reach into
setterstring The set operation. See module:documents/probe.updateOperators for the operators you can use.
newValueobject The value to write to the, or if the operator is $pull, the query of items to look for
Detalles
-
<static> any( obj, qu ) → {boolean}
-
Descripción
Returns true if any of the items match the query
Parámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute. See module:documents/probe.queryOperators for the operators you can use.
Returns
Detalles
-
<static> all( obj, qu ) → {boolean}
-
Descripción
Returns true if all items match the query
Parámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute. See module:documents/probe.queryOperators for the operators you can use.
Returns
Detalles
-
<static> remove( obj, qu ) → {object|array}
-
Descripción
Remove all items in the object/array that match the query
Parámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute. See module:documents/probe.queryOperators for the operators you can use.
Returns
Detalles
-
<static> findOne( obj, qu ) → {object}
-
Descripción
Returns the first record that matches the query. Aliased as
seek.Parámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute. See module:documents/probe.queryOperators for the operators you can use.
Returns
Detalles
-
<static> findOneKey( obj, qu ) → {object}
-
Descripción
Returns the first record that matches the query and returns its key or index depending on whether
objis an object or array respectively.
Aliased asseekKey.Parámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute. See module:documents/probe.queryOperators for the operators you can use.
Returns
Detalles
-
<static> findKeys( obj, qu ) → {array}
-
Descripción
Find all records that match a query and returns the keys for those items. This is similar to module:documents/probe.find but instead of returning
records, returns the keys. Ifobjis an object it will return the hash key. If 'obj' is an array, it will return the indexParámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute. See module:documents/probe.queryOperators for the operators you can use.
Returns
Detalles
-
<static> find( obj, qu ) → {array}
-
Descripción
Find all records that match a query
Parámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute. See module:documents/probe.queryOperators for the operators you can use.
Returns
Detalles
-
<static> update( obj, qu, setDocument )
-
Descripción
Updates all records in obj that match the query. See module:documents/probe.updateOperators for the operators that are supported.
Parámetros
Nombre Tipo Descripción objobject | array The object to update
quobject The query which will be used to identify the records to updated
setDocumentobject The update operator. See module:documents/probe.updateOperators
Detalles
-
<static> some( obj, qu ) → {boolean}
-
Descripción
Returns true if any of the items match the query. Aliases as
anyParámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute
Returns
Detalles
-
<static> every( obj, qu ) → {boolean}
-
Descripción
Returns true if all items match the query. Aliases as
allParámetros
Nombre Tipo Descripción objarray | object The object to query
quobject The query to execute
Returns
Detalles