Skip to main content

Class: FindOptions

Defined in: handler/find/find-options.ts:6

Implements

  • IFindOptions

Constructors

Constructor

new FindOptions(data): FindOptions

Defined in: handler/find/find-options.ts:27

Parameters

data

FindOptions

Returns

FindOptions

Properties

consistency?

optional consistency: SearchConsistency

Defined in: handler/find/find-options.ts:13

Implementation of

IFindOptions.consistency


enforceRefCheck?

optional enforceRefCheck: boolean | "throw"

Defined in: handler/find/find-options.ts:25


ignoreCase?

optional ignoreCase: boolean

Defined in: handler/find/find-options.ts:24

Implementation of

IFindOptions.ignoreCase


lean?

optional lean: boolean

Defined in: handler/find/find-options.ts:23

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


limit?

optional limit: number

Defined in: handler/find/find-options.ts:8

Implementation of

IFindOptions.limit


noCollection?

optional noCollection: boolean

Defined in: handler/find/find-options.ts:14

Implementation of

IFindOptions.noCollection


populate?

optional populate: PopulateFieldsType

Defined in: handler/find/find-options.ts:10

Implementation of

IFindOptions.populate


populateMaxDeep?

optional populateMaxDeep: number

Defined in: handler/find/find-options.ts:11

Implementation of

IFindOptions.populateMaxDeep


select?

optional select: string | string[] | ISelectType[]

Defined in: handler/find/find-options.ts:12

Implementation of

IFindOptions.select


skip?

optional skip: number

Defined in: handler/find/find-options.ts:7

Implementation of

IFindOptions.skip


sort?

optional sort: Record<string, SortType>

Defined in: handler/find/find-options.ts:9

Implementation of

IFindOptions.sort


transactionContext?

optional transactionContext: TransactionAttemptContext

Defined in: handler/find/find-options.ts:26