Skip to main content
Version: 6.3

FindOptions <Entity, Hint, Fields, Excludes>

Hierarchy

Index

Properties

optionalafter

after?: string | FilterObject<Entity> | { endCursor: null | string }

Fetch items after this cursor.

optionalbefore

before?: string | FilterObject<Entity> | { startCursor: null | string }

Fetch items before this cursor.

optionalcache

cache?: number | boolean | [string, number]

optionalcomments

comments?: string | string[]

sql only

optionalconnectionType

connectionType?: ConnectionType

optionalconvertCustomTypes

convertCustomTypes?: boolean

optionalctx

ctx?: any

optionaldisableIdentityMap

disableIdentityMap?: boolean

optionalexclude

exclude?: readonly AutoPath<Entity, Excludes, never, 9>[]

optionalfields

fields?: readonly AutoPath<Entity, Fields, *, 9>[]

optionalfilters

filters?: FilterOptions

optionalfirst

first?: number

Fetch first N items.

optionalflags

flags?: QueryFlag[]

optionalflushMode

flushMode?: always | FlushMode | commit | auto

optionalgroupBy

groupBy?: string | string[]

sql only

optionalhaving

having?: QBFilterQuery<Entity>

optionalhintComments

hintComments?: string | string[]

sql only

optionalindexHint

indexHint?: string

sql only

optionallast

last?: number

Fetch last N items.

optionallimit

limit?: number

optionallockMode

lockMode?: NONE | PESSIMISTIC_READ | PESSIMISTIC_WRITE | PESSIMISTIC_PARTIAL_WRITE | PESSIMISTIC_WRITE_OR_FAIL | PESSIMISTIC_PARTIAL_READ | PESSIMISTIC_READ_OR_FAIL

sql only

optionallockTableAliases

lockTableAliases?: string[]

sql only

optionalloggerContext

loggerContext?: LogContext

optionallogging

logging?: LoggingOptions

optionaloffset

offset?: number

optionalorderBy

orderBy?: OrderDefinition<Entity>

optionaloverfetch

overfetch?: boolean

Fetch one more item than first/last, enabled automatically in em.findByCursor to check if there is a next page.

optionalpopulate

populate?: Populate<Entity, Hint>

optionalpopulateOrderBy

populateOrderBy?: OrderDefinition<Entity>

optionalpopulateWhere

populateWhere?: PopulateHint | infer | all | ObjectQuery<Entity>

optionalrefresh

refresh?: boolean

optionalschema

schema?: string

optionalstrategy

strategy?: LoadStrategy | select-in | joined

sql only