$darkmode
Qore CdsRestDataProvider Module Reference 1.0.0
CdsRestDataProviderDefs.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
28public struct QueryOperatorInfo {
29 string op;
30 auto arg;
31};
32
33
39const QUERY_OP_CONTAINS = "contains";
40
42const QUERY_OP_ENDSWITH = "endswith";
43
45const QUERY_OP_STARTSWITH = "startswith";
46
48
50const QUERY_OP_LT = "lt";
51
53
55const QUERY_OP_LE = "le";
56
58
60const QUERY_OP_GT = "gt";
61
63
65const QUERY_OP_GE = "ge";
66
68
70const QUERY_OP_NE = "ne";
71
73
75const QUERY_OP_EQ = "eq";
76
78
80const QUERY_OP_NOT = "not";
81
83
85const QUERY_OP_OR = "or";
87
102 hash<QueryOperatorInfo> query_make_op(string op, auto arg);
103
104
106
115 hash<QueryOperatorInfo> query_op_like(string str);
116
117
119
128 hash<QueryOperatorInfo> query_op_contains(string str);
129
130
132
141 hash<QueryOperatorInfo> query_op_lt(auto arg);
142
143
145
154 hash<QueryOperatorInfo> query_op_le(auto arg);
155
156
158
167 hash<QueryOperatorInfo> query_op_gt(auto arg);
168
169
171
180 hash<QueryOperatorInfo> query_op_ge(auto arg);
181
182
184
191 hash<QueryOperatorInfo> query_op_ne(auto arg);
192
193
195
204 hash<QueryOperatorInfo> query_op_eq(auto arg);
205
206
208
215 hash<QueryOperatorInfo> query_op_not(hash arg);
216
217
219
234 hash<string, hash<QueryOperatorInfo>> query_wop_or(hash<auto> h1, hash<auto> h2);
235
237
241 "code": string sub (object i, string cn, auto arg) {
242 return sprintf("contains(%s, %s)", cn, arg);
243 },
244 ),
246 "code": string sub (object i, string cn, auto arg) {
247 return sprintf("endswith(%s, %s)", cn, arg);
248 },
249 ),
251 "code": string sub (object i, string cn, auto arg) {
252 return sprintf("startswith(%s, %s)", cn, arg);
253 },
254 ),
255 QUERY_OP_LT: (
256 "code": string sub (object i, string cn, auto arg) {
257 return sprintf("%s lt %s", cn, arg);
258 },
259 ),
260 QUERY_OP_LE: (
261 "code": string sub (object i, string cn, auto arg) {
262 return sprintf("%s le %s", cn, arg);
263 },
264 ),
265 QUERY_OP_GT: (
266 "code": string sub (object i, string cn, auto arg) {
267 return sprintf("%s gt %s", cn, arg);
268 },
269 ),
270 QUERY_OP_GE: (
271 "code": string sub (object i, string cn, auto arg) {
272 return sprintf("%s ge %s", cn, arg);
273 },
274 ),
275 QUERY_OP_NE: (
276 "code": string sub (object i, string cn, auto arg) {
277 return sprintf("%s ne %s", cn, arg);
278 },
279 ),
280 QUERY_OP_EQ: (
281 "code": string sub (object i, string cn, auto arg) {
282 return sprintf("%s eq %s", cn, arg);
283 },
284 ),
285 QUERY_OP_NOT: (
286 "recursive": True,
287 "code": string sub (object i, string cn, auto arg) {
288 return sprintf("not (%s)", cn);
289 },
290 ),
291 QUERY_OP_OR: (
292 "code": string sub (object i, string cn, list<auto> arg) {
293 return i.getOrClause(arg);
294 },
295 ),
296};
298};
const True
hash< QueryOperatorInfo > query_op_le(auto arg)
returns an QueryOperatorInfo hash for the "<=" operator with the given argument for use in cds querie...
hash< QueryOperatorInfo > query_op_lt(auto arg)
returns an QueryOperatorInfo hash for the "<" operator with the given argument for use in cds queries...
hash< QueryOperatorInfo > query_op_gt(auto arg)
returns an QueryOperatorInfo hash for the ">" operator with the given argument for use in cds queries...
hash< QueryOperatorInfo > query_op_like(string str)
returns an QueryOperatorInfo hash for the "contains" operator with the given argument for use in cds ...
hash< QueryOperatorInfo > query_op_ge(auto arg)
returns an QueryOperatorInfo hash for the ">=" operator with the given argument for use in cds querie...
hash< QueryOperatorInfo > query_op_not(hash arg)
returns an QueryOperatorInfo hash for the "not" operator; for use in cds queries
hash< QueryOperatorInfo > query_op_ne(auto arg)
returns an QueryOperatorInfo hash for the "!=" or "<>" operator with the given argument for use in cd...
hash< QueryOperatorInfo > query_op_eq(auto arg)
returns an QueryOperatorInfo hash for the "=" operator with the given argument for use in cds queries...
hash< QueryOperatorInfo > query_make_op(string op, auto arg)
hash< string, hash< QueryOperatorInfo > > query_wop_or(hash< auto > h1, hash< auto > h2)
returns an QueryOperatorInfo hash with a fake "_OR_" column name; the list of arguments to the functi...
hash< QueryOperatorInfo > query_op_contains(string str)
returns an QueryOperatorInfo hash for the "contains" operator with the given argument for use in cds ...
const QUERY_OP_ENDSWITH
like/contains operator
Definition: CdsRestDataProviderDefs.qc.dox.h:42
const QUERY_OP_EQ
the Query equals operator (=) for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:75
const QUERY_OP_OR
to combine Query expressions with "or" for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:85
const QUERY_OP_LE
the Query less than or equals (<=) operator for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:55
const QUERY_OP_GE
the Query greater than or equals operator (>=) for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:65
const QUERY_OP_STARTSWITH
like/contains operator
Definition: CdsRestDataProviderDefs.qc.dox.h:45
const QUERY_OP_NE
the Query not equals operator (!= or <>) for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:70
const QUERY_OP_NOT
the Query "not" operator for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:80
const QUERY_OP_GT
the Query greater than operator (>) for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:60
const QUERY_OP_LT
the Query less than (<) operator for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:50
const QUERY_OP_CONTAINS
Definition: CdsRestDataProviderDefs.qc.dox.h:39
string sprintf(string fmt,...)
hash< auto > hash(object obj)
Qore CDSRestDataProviderDefs definitions.
Definition: CdsRestDataProviderDefs.qc.dox.h:26
const DefaultQueryOpMap
a hash of valid operators for use in queries
Definition: CdsRestDataProviderDefs.qc.dox.h:239
Query operator info hash as returned by all operator functions.
Definition: CdsRestDataProviderDefs.qc.dox.h:28
string op
the operator string code
Definition: CdsRestDataProviderDefs.qc.dox.h:29
auto arg
optional argument
Definition: CdsRestDataProviderDefs.qc.dox.h:30