Internal
Create through query() or an ORM DbSet.
Readonly Internal[Type-only fluent return constructor.
Readonly Internal[Type-only ordered argument contract.
Readonly Internal[Nominal identity for typed child-query customizers.
ReadonlyrowRuntime union matching decoded results, including selected variant bodies.
ReadonlyvariantStable object schemas keyed by discriminator, suitable for mapper.configure().
True when all branches retain complete entity rows.
Internal
Shared parameter plan across union branches and included relations.
ProtectedaddExplicit AND spelling of where(), including groups and typed parameters.
Explicit AND spelling of where(), including groups and typed parameters.
Explicit AND spelling of where(), including groups and typed parameters.
Explicit AND spelling of where(), including groups and typed parameters.
Configure a captured union SELECT and declare its complete raw output shape.
Internal
Compile one UNION ALL statement; JSON preserves distinct branch shapes.
Optionalcorrelate: ReadCorrelationOptionalmode: typeof COMPILE_PARAMETERSCount matching rows across variants, excluding global pagination and ordering.
Customize a variant's typed read query, including nested relations. Return the configured query; other branches and their schemas are unchanged.
Load a common relation on every branch, configuring the child exactly once.
Optionalcustomize: (Customize a relation on one discriminator branch.
Optionalcustomize: (Internal
Capture native primary keys for a single writable ORM variant.
Order all variants together, not independently within each branch.
Add an OR comparison or parenthesized group.
Add an OR comparison or parenthesized group.
Add an OR comparison or parenthesized group.
Add an OR comparison or parenthesized group.
Globally paginate the discriminated union, leaving the source and its metadata unchanged.
ProtectedreadQuote a mapped column for trusted raw SQL or correlated subqueries.
Internal
Check the identity of the original read source, retained by clones.
Select trusted SQL from the union envelope with an explicit output contract.
Return a separately mutable Knex snapshot of the union statement.
Render debugging SQL without performing any database calls.
Add a synchronous group, retaining the group's inferred named parameters.
Match a record of concrete equality values. Use selectors for parameters.
Match a column and infer a named parameter's storage type.
Add a bound comparison using a supported SQL operator.
Match a fixed value tuple or captured SELECT subquery.
JSON-path strings do not provide a schema-derived parameter type.
Optionaloperator: stringOptionalvalue: A & WithoutParameters<NoInfer<A>>Negate equality while preserving ordinary SQL null semantics.
Match SQL null without changing the declared result type.
Trusted SQL with concrete bindings; use a typed predicate for placeholders.
Trusted SQL with concrete bindings; use a typed predicate for placeholders.
Filter one branch using schema property names; other variants remain unaffected.
Immutable polymorphic read graph. Branches are combined in one PostgreSQL statement; rowSchema is a real discriminated union and variantRowSchemas supplies object schemas for separately configured mappers. Framework does not choose application DTO mappings.