Documentation
    Preparing search index...

    Enumeration Lock

    Possible options for row locking. Used in conjunction with find calls:

    Usage:

    import { LOCK } from '@sequelize/core';

    Model.findAll({
    transaction,
    lock: LOCK.UPDATE,
    });

    Postgres also supports specific locks while eager loading by using OF:

    import { LOCK } from '@sequelize/core';

    UserModel.findAll({
    transaction,
    lock: {
    level: LOCK.KEY_SHARE,
    of: UserModel,
    },
    });

    UserModel will be locked but other models won't be!

    Read more on transaction locks here

    Index
    KEY_SHARE: "KEY SHARE"

    Postgres 9.3+ only

    NO_KEY_UPDATE: "NO KEY UPDATE"

    Postgres 9.3+ only

    SHARE: "SHARE"
    UPDATE: "UPDATE"