MCPcopy Index your code
hub / github.com/sequelize/sequelize / constructor

Method constructor

src/dialects/abstract/query.js:13–35  ·  view source on GitHub ↗
(connection, sequelize, options)

Source from the content-addressed store, hash-verified

11class 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

Callers

nothing calls this directly

Calls 1

checkLoggingOptionMethod · 0.95

Tested by

no test coverage detected