Skip to main content
Version: 6.4

MatchingOptions <T, P>

Hierarchy

Index

Properties

optionalinheritedafter

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

Fetch items after this cursor.

optionalinheritedbefore

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

Fetch items before this cursor.

optionalinheritedcache

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

Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map.

optionalinheritedcomments

comments?: string | string[]

sql only

optionalinheritedconnectionType

connectionType?: ConnectionType

optionalinheritedconvertCustomTypes

convertCustomTypes?: boolean

optionalctx

ctx?: any

optionalinheriteddisableIdentityMap

disableIdentityMap?: boolean

optionalinheritedexclude

exclude?: readonly never[]

optionalinheritedfields

fields?: readonly (ALL extends StringKeys<T, *> ? (NonNullable<GetStringKey<T, StringKeys<T, *> & ALL, *>> extends unknown ? ALL : never) | (StringKeys<NonNullable<GetStringKey<T, StringKeys<T, *> & ALL, *>>, *> extends never ? never : `${StringKeys<T, *> & ALL}.`) : StringKeys<T, *> | `${CollectionKeys<T>}:ref`)[]

optionalinheritedfilters

filters?: FilterOptions

optionalinheritedfirst

first?: number

Fetch first N items.

optionalinheritedflags

flags?: QueryFlag[]

optionalinheritedflushMode

flushMode?: always | FlushMode | commit | auto

optionalinheritedgroupBy

groupBy?: string | string[]

sql only

optionalinheritedhaving

having?: QBFilterQuery<T>

optionalinheritedhintComments

hintComments?: string | string[]

sql only

optionalinheritedindexHint

indexHint?: string

sql only

optionalinheritedlast

last?: number

Fetch last N items.

optionalinheritedlimit

limit?: number

Limit the number of returned results. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case.

optionalinheritedlockMode

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

sql only

optionalinheritedlockTableAliases

lockTableAliases?: string[]

sql only

optionalinheritedloggerContext

loggerContext?: LogContext

optionalinheritedlogging

logging?: LoggingOptions

optionalinheritedoffset

offset?: number

Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case.

optionalinheritedorderBy

orderBy?: OrderDefinition<T>

Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc)

optionalinheritedoverfetch

overfetch?: boolean

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

optionalinheritedpopulate

populate?: Populate<T, P>

optionalinheritedpopulateFilter

populateFilter?: ObjectQuery<T>

Filter condition for populated relations. This is similar to populateWhere, but will produce a left join when nesting the condition. This is used for implementation of joined filters.

optionalinheritedpopulateOrderBy

populateOrderBy?: OrderDefinition<T>

Used for ordering of the populate queries. If not specified, the value of options.orderBy is used.

optionalinheritedpopulateWhere

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

Where condition for populated relations. This will have no effect on the root entity. With select-in strategy, this is applied only to the populate queries. With joined strategy, those are applied as join on conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition.

optionalinheritedrefresh

refresh?: boolean

optionalinheritedschema

schema?: string

optionalstore

store?: boolean

optionalinheritedstrategy

strategy?: LoadStrategy | select-in | joined

sql only

optionalwhere

where?: FilterQuery<T>