Documentation / zerotal / orm / NPlusOneError
Class: NPlusOneError
Defined in: packages/orm/src/db/NPlusOneDetector.ts:25
Thrown (in throw mode) or logged (in warn mode) when one normalised query
shape runs more times than the configured threshold within a single request —
the signature of an N+1 access pattern. Carries the offending fingerprint
and its count; error code E_N_PLUS_ONE.
Extends
Constructors
Constructor
new NPlusOneError(
fingerprint,count):NPlusOneError
Defined in: packages/orm/src/db/NPlusOneDetector.ts:29
Parameters
fingerprint
string
count
number
Returns
NPlusOneError
Overrides
Properties
code
readonlycode:string
Defined in: packages/core/src/errors/ZerotalError.ts:18
Inherited from
status
readonlystatus:number=500
Defined in: packages/core/src/errors/ZerotalError.ts:19
Inherited from
context?
readonlyoptionalcontext?:Record<string,unknown>
Defined in: packages/core/src/errors/ZerotalError.ts:20
Inherited from
fingerprint
readonlyfingerprint:string
Defined in: packages/orm/src/db/NPlusOneDetector.ts:26
count
readonlycount:number
Defined in: packages/orm/src/db/NPlusOneDetector.ts:27