Optional
attributeOptional
benchmarkPass query execution time in milliseconds as second argument to logging function (options.logging).
Optional
clientThe PostgreSQL client_min_messages
session parameter.
Set to false
to not override the database's default.
Deprecated in v7, please use the sequelize option "dialectOptions.clientMinMessages" instead
'warning'
Optional
databaseThe name of the database
Optional
defineDefault options for model definitions. See Model.init.
Optional
dialectThe dialect of the database you are connecting to. One of mysql, postgres, sqlite, mariadb and mssql.
'mysql'
Optional
dialectIf specified, will use the provided module as the dialect.
`dialectModule: require('@myorg/tedious'),`
Optional
dialectIf 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
dialectAn object of additional options, which are passed directly to the connection library
Optional
hooksSets global permanent hooks.
Optional
hostThe host of the relational database.
'localhost'
Optional
isolationSet the default transaction isolation level. See Sequelize.Transaction.ISOLATION_LEVELS
for possible
options.
'REPEATABLE_READ'
Optional
logSet to true
to show bind parameters in log.
false
Optional
loggingA function that gets executed while running the query to log the sql.
Optional
timing: numberOptional
Optional
minifySet to true
to automatically minify aliases generated by sequelize.
Mostly useful to circumvent the POSTGRES alias limit of 64 characters.
false
Optional
modelMatches models by filename using a custom function.
(filename, member) => filename === member
Optional
modelPath to models, which should be loaded
Optional
modelsPath to models or actual models, which should be loaded for sequelize instance
Optional
nativeA flag that defines if native library shall be used or not. Currently only has an effect for postgres
false
Optional
omitA flag that defines if null values should be passed to SQL queries or not.
false
Optional
operatorsSets available operator aliases. See (https://sequelize.org/master/manual/querying.html#operators) for more information. WARNING: Setting this to boolean value was deprecated and is no-op.
all aliases
Optional
passwordThe password which is used to authenticate against the database.
Optional
poolConnection pool options
Optional
portThe port of the relational database.
Optional
protocolThe protocol of the relational database.
'tcp'
Optional
queryDefault options for sequelize.query
Optional
quoteSet to false
to make table names and attributes case-insensitive on Postgres and skip double quoting of
them.
true
Optional
replicationUse 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
false
Optional
repositoryIf true enables repository mode when true
Optional
retryOptional
schemaIf defined the connection will use the provided schema instead of the default ("public").
Optional
setDefault options for sequelize.set
Optional
sslA flag that defines if is used SSL.
Optional
standardThe PostgreSQL standard_conforming_strings
session parameter. Set to false
to not set the option.
WARNING: Setting this to false may expose vulnerabilities and is not recommended!
true
Optional
storageOnly used by sqlite.
':memory:'
Optional
syncDefault options for sequelize.sync
Optional
timezoneThe 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.
'+00:00'
Optional
transactionSet the default transaction type. See Sequelize.Transaction.TYPES for possible options. Sqlite only.
'DEFERRED'
Optional
typeRun built in type validators on insert and update, e.g. validate that arguments passed to integer fields are integer-like.
false
Optional
usernameThe username which is used to authenticate against the database.
Optional
validateIf true enables validate only mode
Generated using TypeDoc
Sequelize had to introduce a breaking change to fix vulnerability CVE-2023-22578. This option allows you to revert to the old behavior (unsafe-legacy), or to opt in to the new behavior (escape). The default behavior throws an error to warn you about the change (throw).