Class Deferrable

Can be used to make foreign key constraints deferrable and to set the constaints within a transaction. This is only supported in PostgreSQL.

The foreign keys can be configured like this. It will create a foreign key that will check the constraints immediately when the data was inserted.

class MyModel extends Model {}
MyModel.init({
foreign_id: {
type: DataTypes.INTEGER,
references: {
model: OtherModel,
key: 'id',
deferrable: Sequelize.Deferrable.INITIALLY_IMMEDIATE
}
}
}, { sequelize });

The constraints can be configured in a transaction like this. It will trigger a query once the transaction has been started and set the constraints to be checked at the very end of the transaction.

sequelize.transaction({
deferrable: Sequelize.Deferrable.SET_DEFERRED
});

Hierarchy

  • Deferrable

Constructors

Properties

INITIALLY_DEFERRED: {
    INITIALLY_DEFERRED: any;
    INITIALLY_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    NOT: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    SET_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (constraints: string[]): {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#6@#constraints: string[];
        toSql: any;
        toString: any;
    });
    SET_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: any;
        toString: any;
        new (constraints: string[]): {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#7@#constraints: string[];
        toSql: any;
        toString: any;
    });
    toString: any;
    new (): {
        toSql: any;
        toString: any;
    };
} & (() => {
    toSql: any;
    toString: any;
})
INITIALLY_IMMEDIATE: {
    INITIALLY_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    INITIALLY_IMMEDIATE: any;
    NOT: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    SET_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (constraints: string[]): {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#6@#constraints: string[];
        toSql: any;
        toString: any;
    });
    SET_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: any;
        toString: any;
        new (constraints: string[]): {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#7@#constraints: string[];
        toSql: any;
        toString: any;
    });
    toString: any;
    new (): {
        toSql: any;
        toString: any;
    };
} & (() => {
    toSql: any;
    toString: any;
})
NOT: {
    INITIALLY_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    INITIALLY_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    NOT: any;
    SET_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (constraints: string[]): {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#6@#constraints: string[];
        toSql: any;
        toString: any;
    });
    SET_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: any;
        toString: any;
        new (constraints: string[]): {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#7@#constraints: string[];
        toSql: any;
        toString: any;
    });
    toString: any;
    new (): {
        toSql: any;
        toString: any;
    };
} & (() => {
    toSql: any;
    toString: any;
})

Will set the constraints to not deferred. This is the default in PostgreSQL and it make it impossible to dynamically defer the constraints within a transaction.

SET_DEFERRED: {
    INITIALLY_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    INITIALLY_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    NOT: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    SET_DEFERRED: any;
    SET_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: any;
        toString: any;
        new (constraints: string[]): {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#7@#constraints: string[];
        toSql: any;
        toString: any;
    });
    toString: any;
    new (constraints: string[]): {
        __#6@#constraints: string[];
        toSql: any;
        toString: any;
    };
} & ((constraints: string[]) => {
    __#6@#constraints: string[];
    toSql: any;
    toString: any;
})

Will trigger an additional query at the beginning of a transaction which sets the constraints to deferred.

SET_IMMEDIATE: {
    INITIALLY_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    INITIALLY_IMMEDIATE: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: {
                    INITIALLY_DEFERRED: any;
                    INITIALLY_IMMEDIATE: any;
                    NOT: any;
                    SET_DEFERRED: any;
                    SET_IMMEDIATE: any;
                    toString: any;
                    new (constraints: string[]): {
                        __#7@#constraints: string[];
                        toSql: any;
                        toString: any;
                    };
                } & ((constraints: string[]) => {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                });
                toString: any;
                new (constraints: string[]): {
                    __#6@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            });
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (): {
                toSql: any;
                toString: any;
            };
        } & (() => {
            toSql: any;
            toString: any;
        });
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    NOT: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: {
                INITIALLY_DEFERRED: any;
                INITIALLY_IMMEDIATE: any;
                NOT: any;
                SET_DEFERRED: any;
                SET_IMMEDIATE: any;
                toString: any;
                new (constraints: string[]): {
                    __#7@#constraints: string[];
                    toSql: any;
                    toString: any;
                };
            } & ((constraints: string[]) => {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            });
            toString: any;
            new (constraints: string[]): {
                __#6@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        });
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (): {
            toSql: any;
            toString: any;
        };
    } & (() => {
        toSql: any;
        toString: any;
    });
    SET_DEFERRED: {
        INITIALLY_DEFERRED: any;
        INITIALLY_IMMEDIATE: any;
        NOT: any;
        SET_DEFERRED: any;
        SET_IMMEDIATE: {
            INITIALLY_DEFERRED: any;
            INITIALLY_IMMEDIATE: any;
            NOT: any;
            SET_DEFERRED: any;
            SET_IMMEDIATE: any;
            toString: any;
            new (constraints: string[]): {
                __#7@#constraints: string[];
                toSql: any;
                toString: any;
            };
        } & ((constraints: string[]) => {
            __#7@#constraints: string[];
            toSql: any;
            toString: any;
        });
        toString: any;
        new (constraints: string[]): {
            __#6@#constraints: string[];
            toSql: any;
            toString: any;
        };
    } & ((constraints: string[]) => {
        __#6@#constraints: string[];
        toSql: any;
        toString: any;
    });
    SET_IMMEDIATE: any;
    toString: any;
    new (constraints: string[]): {
        __#7@#constraints: string[];
        toSql: any;
        toString: any;
    };
} & ((constraints: string[]) => {
    __#7@#constraints: string[];
    toSql: any;
    toString: any;
})

Will trigger an additional query at the beginning of a transaction which sets the constraints to immediately.

Methods

  • Parameters

    • _queryGenerator: AbstractQueryGenerator

    Returns void

  • Parameters

    • queryGenerator: AbstractQueryGenerator

    Returns void

  • Parameters

    • queryGenerator: AbstractQueryGenerator

    Returns void

Generated using TypeDoc