Options
All
  • Public
  • Public/Protected
  • All
Menu

Options for the constructor of Sequelize main class

Hierarchy

  • Options

Index

Properties

Optional benchmark

benchmark: boolean

Print query execution time in milliseconds when logging SQL.

Defaults to false

Optional define

define: DefineOptions<any>

Default options for model definitions. See sequelize.define for options

Optional dialect

dialect: string

The dialect of the database you are connecting to. One of mysql, postgres, sqlite, mariadb and mssql.

Defaults to 'mysql'

Optional dialectModulePath

dialectModulePath: string

If specified, load the dialect library from this path. For example, if you want to use pg.js instead of pg when connecting to a pg database, you should specify 'pg.js' here

Optional dialectOptions

dialectOptions: Object

An object of additional options, which are passed directly to the connection library

Optional host

host: string

The host of the relational database.

Defaults to 'localhost'

Optional isolationLevel

isolationLevel: string

Set the default transaction isolation level. See Sequelize.Transaction.ISOLATION_LEVELS for possible options.

Defaults to 'REPEATABLE_READ'

Optional logging

logging: boolean | Function

A function that gets executed everytime Sequelize would log something.

Defaults to console.log

Optional native

native: boolean

A flag that defines if native library shall be used or not. Currently only has an effect for postgres

Defaults to false

Optional omitNull

omitNull: boolean

A flag that defines if null values should be passed to SQL queries or not.

Defaults to false

Optional pool

Connection pool options

Optional port

port: number

The port of the relational database.

Optional protocol

protocol: string

The protocol of the relational database.

Defaults to 'tcp'

Optional query

Default options for sequelize.query

Optional quoteIdentifiers

quoteIdentifiers: boolean

Set to false to make table names and attributes case-insensitive on Postgres and skip double quoting of them.

Defaults to true

Optional replication

replication: ReplicationOptions

Use read / write replication. To enable replication, pass an object, with two properties, read and write. Write should be an object (a single server for handling writes), and read an array of object (several servers to handle reads). Each read/write server can have the following properties: host, port, username, password, database

Defaults to false

Optional set

Default options for sequelize.set

Optional storage

storage: string

Only used by sqlite.

Defaults to ':memory:'

Optional sync

Default options for sequelize.sync

Optional timezone

timezone: string

The timezone used when converting a date from the database into a JavaScript date. The timezone is also used to SET TIMEZONE when connecting to the server, to ensure that the result of NOW, CURRENT_TIMESTAMP and other time related functions have in the right timezone. For best cross platform performance use the format +/-HH:MM. Will also accept string versions of timezones used by moment.js (e.g. 'America/Los_Angeles'); this is useful to capture daylight savings time changes.

Defaults to '+00:00'

Optional transactionType

transactionType: string

Set the default transaction type. See Sequelize.Transaction.TYPES for possible options.

Defaults to 'DEFERRED'

Generated using TypeDoc