Load an entity where fieldName equals fieldValue, or null if no entity exists.
entity result where uniqueFieldName equals fieldValue, or null if no entity matches the condition.
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 results that matches the query, where result error can be UnauthorizedError
Load many entities where fieldName equals fieldValue.
array of entity results that match the query for fieldValue, where result error can be UnauthorizedError
Load many entities where fieldName is one of fieldValues.
map from fieldValue to entity results that match the query for that fieldValue, where result errors can be UnauthorizedError
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 entity results that match the query, where result error can be UnauthorizedError
Loads many entities for a list of IDs.
IDs of the entities to load
map from ID to corresponding entity result, where result error can be UnauthorizedError or EntityNotFoundError.
Loads many entities for a list of IDs, returning null for any IDs that are non-existent.
IDs of the entities to load
map from ID to nullable corresponding entity result, where result error can be UnauthorizedError or EntityNotFoundError.
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 entity results that match the query, where result error can be UnauthorizedError
Important notes:
Authorization-result-based entity loader. All normal loads are batched, cached, and authorized against the entity's EntityPrivacyPolicy. All loads through this loader are are results (or null for some loader methods), where an unsuccessful result means an authorization error or entity construction error occurred. Other errors are thrown.