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
52 lines (43 loc) · 959 Bytes
/
Copy pathSDD.Source.js
File metadata and controls
52 lines (43 loc) · 959 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
EVEoj.SDD.Source = EVEoj.SDD.Source || {};
(function () {
var ME = EVEoj.SDD.Source,
// namespace quick refs
E = EVEoj,
SDD = EVEoj.SDD,
_P = {}, // private methods
P = {} // public methods
;
ME.P = P;
ME.D = {
// default object properties
'tables': {},
'version': null,
'verdesc': null,
'schema': null
};
P.Create = function(config) { return null; };
// return promise:
// rejectWith(ctx, [this, status, errmsg]);
// resolveWith(ctx, [this]);
P.LoadMeta = function(ctx) {
p.rejectWith(ctx, [this, 'error', 'not implemented']);
return p.promise();
};
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];
};
})();