Documentation
    Preparing search index...

    Interface EphemeralSequelizeOptions<Dialect>

    Sequelize options that are not persisted in the Sequelize instance.

    interface EphemeralSequelizeOptions<Dialect extends AbstractDialect> {
        databaseVersion?: string;
        dialect: Class<Dialect>;
        hooks?: Partial<SequelizeHooks<Dialect>>;
        models?: ModelStatic[];
        pool?: PoolOptions<Dialect>;
        url?: string;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index
    databaseVersion?: string

    The version of the Database Sequelize will connect to. If unspecified, or set to 0, Sequelize will retrieve it during its first connection to the Database.

    dialect: Class<Dialect>

    The dialect of the database you are connecting to. Pass the Dialect class exported by the dialect package.

    Sets global permanent hooks.

    models?: ModelStatic[]

    A list of models to load and init.

    This option is only useful if you created your models using decorators. Models created using Model.init or Sequelize#define don't need to be specified in this option.

    Use @sequelize/core!importModels to load models dynamically:

    import { User } from './models/user.js';

    new Sequelize({
    models: [User],
    });
    new Sequelize({
    models: await importModels(__dirname + '/*.model.ts'),
    });

    Connection pool options

    url?: string

    The connection URL. If other connection options are set, they will override the values set in this URL.