forked from nezroy/EVEoj
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSDD.Source.js
More file actions
37 lines (31 loc) · 735 Bytes
/
Copy pathSDD.Source.js
File metadata and controls
37 lines (31 loc) · 735 Bytes
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
// var Utils = require('./Utils');
var P = exports.P = {}; // public methods
exports.D = {
// default object properties
tables: {},
version: null,
verdesc: null,
schema: null
};
// return promise:
// reject({context: ctx, source: this, stats: status, error: errmsg});
// resolve({context: ctx, source: this});
P.LoadMeta = function() {
return null;
};
P.HasTable = function(tbl) {
return this.tables.hasOwnProperty(tbl);
};
P.GetTables = function() {
var tbl_list = [],
tbl;
for (tbl in this.tables) {
if (!this.tables.hasOwnProperty(tbl)) continue;
tbl_list.push(tbl);
}
return tbl_list;
};
P.GetTable = function(tbl) {
if (!tbl || !this.tables.hasOwnProperty(tbl)) return null;
return this.tables[tbl];
};