Class: FindOptions
Implements
IFindOptions
Constructors
constructor
• new FindOptions(data
)
Parameters
Name | Type |
---|---|
data | FindOptions |
Defined in
handler/find/find-options.ts:27
Properties
consistency
• Optional
consistency: SearchConsistency
Implementation of
IFindOptions.consistency
Defined in
handler/find/find-options.ts:13
enforceRefCheck
• Optional
enforceRefCheck: boolean
| "throw"
Defined in
handler/find/find-options.ts:25
ignoreCase
• Optional
ignoreCase: boolean
Implementation of
IFindOptions.ignoreCase
Defined in
handler/find/find-options.ts:24
lean
• Optional
lean: boolean
Documents returned from queries with the lean
option enabled are plain javascript objects, not Ottoman Documents. They have no save methods, hooks or other Ottoman Document's features.
Example
const document = await UserModel.findById(id, { lean: true });
document instanceof Document; // false
Implementation of
IFindOptions.lean
Defined in
handler/find/find-options.ts:23
limit
• Optional
limit: number
Implementation of
IFindOptions.limit
Defined in
handler/find/find-options.ts:8
noCollection
• Optional
noCollection: boolean
Implementation of
IFindOptions.noCollection
Defined in
handler/find/find-options.ts:14
populate
• Optional
populate: PopulateFieldsType
Implementation of
IFindOptions.populate
Defined in
handler/find/find-options.ts:10
populateMaxDeep
• Optional
populateMaxDeep: number
Implementation of
IFindOptions.populateMaxDeep
Defined in
handler/find/find-options.ts:11
select
• Optional
select: string
| string
[] | ISelectType
[]
Implementation of
IFindOptions.select
Defined in
handler/find/find-options.ts:12
skip
• Optional
skip: number
Implementation of
IFindOptions.skip
Defined in
handler/find/find-options.ts:7
sort
• Optional
sort: Record
<string
, SortType
>
Implementation of
IFindOptions.sort
Defined in
handler/find/find-options.ts:9
transactionContext
• Optional
transactionContext: TransactionAttemptContext