Skip to main content
Version: 6.2

FindOneOptions <T, P, F, E>

Hierarchy

Index

Properties

optionalafter

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

Fetch items after this cursor.

optionalbefore

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

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<T, E, never, 9>[]

optionalfields

fields?: readonly AutoPath<T, F, *, 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<T>

optionalhintComments

hintComments?: string | string[]

sql only

optionalindexHint

indexHint?: string

sql only

optionallast

last?: number

Fetch last N items.

optionallockMode

lockMode?: LockMode

optionallockTableAliases

lockTableAliases?: string[]

sql only

optionallockVersion

lockVersion?: number | Date

optionalloggerContext

loggerContext?: LogContext

optionallogging

logging?: LoggingOptions

optionaloffset

offset?: number

optionalorderBy

orderBy?: OrderDefinition<T>

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<T, P>

optionalpopulateOrderBy

populateOrderBy?: OrderDefinition<T>

optionalpopulateWhere

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

optionalrefresh

refresh?: boolean

optionalschema

schema?: string

optionalstrategy

strategy?: LoadStrategy | select-in | joined

sql only