OptionalattributesIf an array: a list of the attributes that you want to select.
Attributes can also be raw SQL (literal), fn, col, and cast
To rename an attribute, you can pass an array, with two elements:
literal, fn, col, cast),If include is used: selects all the attributes of the model,
plus some additional ones. Useful for aggregations.
OptionalbenchmarkPass query execution time in milliseconds as second argument to logging function (options.logging).
OptionalcolColumn on which COUNT() should be applied
OptionalconnectionThe connection on which this query must be run. Mutually exclusive with Transactionable.transaction.
Can be used to ensure that a query is run on the same connection as a previous query, which is useful when configuring session options.
Specifying this option takes precedence over CLS Transactions. If a transaction is running in the current AsyncLocalStorage context, it will be ignored in favor of the specified connection.
OptionalcountCount number of records returned by group by
Used in conjunction with group.
OptionaldistinctApply COUNT(DISTINCT(col))
OptionalgroupGROUP BY in sql
Used in conjunction with attributes.
OptionalincludeInclude options. See find for details
OptionalloggingA function that gets executed while running the query to log the sql.
OptionalmaxThis sets the max execution time for MySQL.
OptionalparanoidIf true, only non-deleted records will be returned. If false, both deleted and non-deleted records will be returned.
Only applies if InitOptions.paranoid is true for the model.
OptionaltransactionThe transaction in which this query must be run. Mutually exclusive with Transactionable.connection.
If the Sequelize disableClsTransactions option has not been set to true, and a transaction is running in the current AsyncLocalStorage context, that transaction will be used, unless null or another Transaction is manually specified here.
OptionaluseForce the query to use the write pool, regardless of the query type.
OptionalwhereThe WHERE clause. Can be many things from a hash of attributes to raw SQL.
Visit https://sequelize.org/docs/v7/core-concepts/model-querying-basics/ for more information.
Options for Model.count method