Skip to content

postgrelize / SequelizeOptions

Type Alias: SequelizeOptions ​

SequelizeOptions = Readonly<{ benchmark?: boolean; database?: string; define?: ModelDefaults; dialect?: "postgres"; dialectModule?: object; dialectOptions?: Readonly<Omit<PoolConfig, "types">>; hooks?: HooksOption; host?: string; inAsAnyThreshold?: number; logging?: LoggingFunction | false; minifyAliases?: boolean; password?: string; pool?: PoolOptions; port?: number; replication?: ReplicationOptions; retry?: RetryOptions; ssl?: PoolConfig["ssl"]; statementCache?: boolean | StatementCacheOptions; timezone?: string; username?: string; }>

Defined in: src/connection/options.ts:124

Options of the Sequelize constructor (PostgreSQL subset of Sequelize v6 Options).

All fields are optional; values given in a connection URL are overridden by these fields.

Example ​

ts
const options: SequelizeOptions = {
  dialect: 'postgres',
  host: 'localhost',
  port: 5432,
  pool: { max: 10 },
  logging: false,
  define: { underscored: true },
};
const db = new Sequelize('app', 'user', 'pass', options);

Released under the MIT License.