MCPcopy Create free account
hub / github.com/dresende/node-orm2 / Driver

Function Driver

lib/Drivers/DML/mysql.js:10–31  ·  view source on GitHub ↗
(config, connection, opts)

Source from the content-addressed store, hash-verified

8exports.Driver = Driver;
9
10function Driver(config, connection, opts) {
11 this.dialect = 'mysql';
12 this.config = config || {};
13 this.opts = opts || {};
14 this.customTypes = {};
15
16 if (!this.config.timezone) {
17 this.config.timezone = "local";
18 }
19
20 this.query = new Query({ dialect: this.dialect, timezone: this.config.timezone });
21
22 this.reconnect(null, connection);
23
24 this.aggregate_functions = [ "ABS", "CEIL", "FLOOR", "ROUND",
25 "AVG", "MIN", "MAX",
26 "LOG", "LOG2", "LOG10", "EXP", "POWER",
27 "ACOS", "ASIN", "ATAN", "COS", "SIN", "TAN",
28 "CONV", [ "RANDOM", "RAND" ], "RADIANS", "DEGREES",
29 "SUM", "COUNT",
30 "DISTINCT"];
31}
32
33_.extend(Driver.prototype, shared, DDL);
34

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected