Optional
benchmarkOptional
bindEither an object of named parameter bindings in the format $param
or an array of unnamed
values to bind to $1
, $2
, etc in your SQL.
Optional
concurrentlyPostgreSQL will build the index without taking any write locks. Postgres only.
false
Optional
fieldMap returned fields to arbitrary names for SELECT query type if options.fieldMaps
is present.
Optional
fieldsThe fields to index.
Optional
instanceA sequelize instance used to build the return instance
Optional
loggingA function that gets executed while running the query to log the sql.
Optional
mapMap returned fields to model's fields if options.model
or options.instance
is present.
Mapping will occur before building the model instance.
Optional
nameThe name of the index. Defaults to model name + _ + fields concatenated
Optional
nestIf true, transforms objects with .
separated property names into nested objects using
dottie.js. For example { 'user.username': 'john' } becomes
{ user: { username: 'john' }}. When nest
is true, the query type is assumed to be 'SELECT'
,
unless otherwise specified
false
Optional
operatorIndex operator type. Postgres only
Optional
parserFor FULLTEXT columns set your parser
Optional
plainSets the query type to SELECT
and return a single row
Optional
prefixPrefix to append to the index name.
Optional
rawIf true, sequelize will not try to format the results of the query, or build an instance of a model from the result
Optional
replacementsOnly named replacements are allowed in query interface methods.
Optional
retryOptional
transactionThe transaction in which this query must be run.
If CLS is enabled and a transaction is running in the current CLS context, that transaction will be used, unless null or a Transaction is manually specified here.
Optional
typeIndex type. Only used by mysql. One of UNIQUE
, FULLTEXT
and SPATIAL
Optional
uniqueShould the index by unique? Can also be triggered by setting type to UNIQUE
false
Optional
useForce the query to use the write pool, regardless of the query type.
false
Optional
usingThe method to create the index by (USING
statement in SQL).
BTREE and HASH are supported by mysql and postgres.
Postgres additionally supports GIST, SPGIST, BRIN and GIN.
Optional
whereOptional where parameter for index. Can be used to limit the index to certain rows.
Generated using TypeDoc
Pass query execution time in milliseconds as second argument to logging function (options.logging).