-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdriver-interface.js
41 lines (31 loc) · 989 Bytes
/
driver-interface.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
(function() {
"use strict";
function DbInterface(driverObj) {
this._driver = driverObj;
}
DbInterface.prototype.connect = function() {
return this._driver.connect();
};
DbInterface.prototype.close = function() {
return this._driver.close();
};
DbInterface.prototype.insert = function(tbl, obj) {
return this._driver.insert(tbl, obj);
};
DbInterface.prototype.update = function(tbl, id, obj) {
return this._driver.update(tbl, id, obj);
};
DbInterface.prototype.delete = function(tbl, id) {
return this._driver.delete(tbl, id);
};
DbInterface.prototype.selectAll = function(tbl) {
return this._driver.selectAll(tbl);
};
DbInterface.prototype.selectById = function(tbl, id) {
return this._driver.selectById(tbl, id);
};
DbInterface.prototype.build = function() {
return this._driver.build();
};
module.exports = DbInterface;
})();