Load an entity where compositeField equals compositeFieldValue, or null if no entity exists.
composite field being queried
compositeField value being queried
entity where compositeField equals compositeFieldValue, or null if no entity matches the condition.
Load an entity where fieldName equals fieldValue, or null if no entity exists.
entity where uniqueFieldName equals fieldValue, or null if no entity matches the condition.
Load an entity by a specified ID, or return null if non-existent.
entity for matching ID, or null if no entity exists for ID.
Loads the first entity matching the selection constructed from the conjunction of specified operands, or null if no matching entity exists. Entities loaded using this method are not batched or cached.
This is a convenience method for loadManyByFieldEqualityConjunctionAsync. However, the
orderBy
option must be specified to define what "first" means. If ordering doesn't matter,
explicitly pass in an empty array.
list of field equality selection operand specifications
orderBy and optional offset for the query
the first entity that matches the query or null if no entity matches the query
Load many entities where compositeField equals compositeFieldValue.
composite field being queried
compositeField value being queried
array of entities that match the query for compositeFieldValue
Load many entities where compositeField is one of compositeFieldValues.
composite field being queried
compositeField values being queried
map from compositeFieldValue to entities that match the query for that compositeFieldValue
Load many entities where fieldName equals fieldValue.
array of entities that match the query for fieldValue
Loads many entities matching the selection constructed from the conjunction of specified operands. Entities loaded using this method are not batched or cached.
list of field equality selection operand specifications
limit, offset, and orderBy for the query
array of entities that match the query
Loads many entities matching the raw WHERE clause. Corresponds to the knex whereRaw
argument format.
parameterized SQL WHERE clause with positional binding placeholders or named binding placeholders
array of positional bindings or object of named bindings
limit, offset, orderBy, and orderByRaw for the query
array of entities that match the query
Important notes:
rawWhereClause: `id = ?`
bindings: `[1]`
Entites returned `WHERE id = 1`
http://knexjs.org/#Builder-whereRaw
http://knexjs.org/#Raw-Bindings
Enforcing entity loader. All normal loads are batched, cached, and authorized against the entity's EntityPrivacyPolicy. All loads through this loader will throw if the load is not successful.