Entity
    Preparing search index...

    Interface EntityLoaderQuerySelectionModifiers<TFields, TSelectedFields>

    SQL modifiers that only affect the selection but not the projection.

    interface EntityLoaderQuerySelectionModifiers<
        TFields extends Record<string, any>,
        TSelectedFields extends keyof TFields = keyof TFields,
    > {
        forShare?: boolean;
        forUpdate?: boolean;
        limit?: number;
        offset?: number;
        orderBy?: readonly EntityLoaderOrderByClause<TFields, TSelectedFields>[];
        skipLocked?: boolean;
    }

    Type Parameters

    • TFields extends Record<string, any>
    • TSelectedFields extends keyof TFields = keyof TFields
    Index
    forShare?: boolean

    Lock the selected rows in share mode using SELECT ... FOR SHARE. The lock is held until the end of the transaction, so the query context must be transactional. Mutually exclusive with forUpdate.

    forUpdate?: boolean

    Lock the selected rows for update using SELECT ... FOR UPDATE. The lock is held until the end of the transaction, so the query context must be transactional. Mutually exclusive with forShare.

    limit?: number

    Limit the number of entities returned.

    offset?: number

    Skip the specified number of entities queried before returning.

    Order the entities by specified columns and orders.

    skipLocked?: boolean

    Skip rows that are already locked by another transaction using SKIP LOCKED instead of waiting for them. Requires forUpdate or forShare.