Libraries v5.0.0
    Preparing search index...

    Type Alias EntityQuery<TEntity, TResult, Writable, P>

    EntityQuery: ReadVariantMetadata<EntitySchema<TEntity>> extends {
        discriminator: string;
        variants: Record<string, unknown>;
    }
        ? PolymorphicEntityQuery<TEntity, P>
        : TableEntityQuery<TEntity, TResult, Writable, P>

    The typed query handle returned by every DbSet method that initiates a query (e.g. .where(), .include(), .first()).

    Structurally it IS a SchemaQueryBuilder for the entity's schema, with typed .include() / .includeVariant() methods overlaid. All other SchemaQueryBuilder methods are available and this-returning chains preserve the typed wrapper.

    Type Parameters

    • TEntity extends Entity<any, any, any>
    • TResult
    • Writable extends boolean = true
    • P extends ParameterState = []