-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
21 lines (20 loc) · 762 Bytes
/
index.js
File metadata and controls
21 lines (20 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'use strict';
const initStore = require('./lib/sqlStore'),
initTypes = require('./lib/customTypes');
/**
* Created by Adrian on 29-Mar-16.
* Events:
* - reconnect({name, duration})
* - disconnect({name})
* NOTE:
* - in order to extend a model added by a plugin, you can simply create the models/tableName.js file in your app, and
* module.exports = function extend(modelObj, Seq) {} // you MUST name your exported function "extend", in order to extend an object.
*/
module.exports = function init(thorin, opt) {
initTypes(thorin);
// Attach the SQL error parser to thorin.
thorin.addErrorParser(require('./lib/errorParser'));
const ThorinSqlStore = initStore(thorin, opt);
return ThorinSqlStore;
};
module.exports.publicName = 'sql';