-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathQuery.js
More file actions
81 lines (61 loc) · 1.83 KB
/
Query.js
File metadata and controls
81 lines (61 loc) · 1.83 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
var Class = require('../ext/Class');
var Query = Class.create({
initialize: function(sourceName, criteria, limit, offset, filterConcept, _isLeftJoin, nodes) {
this.sourceName = sourceName;
this.criteria = criteria;
this.limit = limit;
this.offset = offset;
this.filterConcept = filterConcept;
this._isLeftJoin = _isLeftJoin;
// Note: For each element in the nodes array, corresponding data will be made available.
// Thus, if nodes is an empty array, no results will be fetched; set to null to ignore the setting
this.nodes = nodes;
},
shallowClone: function() {
var r = new Query(this.sourceName, this.criteria, this.limit, this.offset, this.filterConcept, this._isLeftJoin, this.nodes);
return r;
},
getSourceName: function() {
return this.sourceName;
},
setSourceName: function(sourceName) {
this.sourceName = sourceName;
},
getCriteria: function() {
return this.criteria;
},
setCriteria: function(criteria) {
this.criteria = criteria;
},
getLimit: function() {
return this.limit;
},
setLimit: function(limit) {
this.limit = limit;
},
getOffset: function() {
return this.offset;
},
setOffset: function(offset) {
this.offset = offset;
},
getFilterConcept: function() {
return this.filterConcept;
},
setFilterConcept: function(filterConcept) {
this.filterConcept = filterConcept;
},
isLeftJoin: function() {
return this._isLeftJoin;
},
setLeftJoin: function(isLeftJoin) {
this._isLeftJoin = isLeftJoin;
},
getNodes: function() {
return this.nodes;
},
setNodes: function(nodes) {
this.nodes = nodes;
},
});
module.exports = Query;