(connection, sequelize, options)
| 11 | class AbstractQuery { |
| 12 | |
| 13 | constructor(connection, sequelize, options) { |
| 14 | this.uuid = uuid(); |
| 15 | this.connection = connection; |
| 16 | this.instance = options.instance; |
| 17 | this.model = options.model; |
| 18 | this.sequelize = sequelize; |
| 19 | this.options = { |
| 20 | plain: false, |
| 21 | raw: false, |
| 22 | // eslint-disable-next-line no-console |
| 23 | logging: console.log, |
| 24 | ...options |
| 25 | }; |
| 26 | this.checkLoggingOption(); |
| 27 | |
| 28 | if (options.rawErrors) { |
| 29 | // The default implementation in AbstractQuery just returns the same |
| 30 | // error object. By overidding this.formatError, this saves every dialect |
| 31 | // having to check for options.rawErrors in their own formatError |
| 32 | // implementations. |
| 33 | this.formatError = AbstractQuery.prototype.formatError; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * rewrite query with parameters |
nothing calls this directly
no test coverage detected