1 |
|
2 | var Add, And, Append, Args, Asc, Avg, Between, Binary, Bracket, Branch, Ceil, ChangeAt, Changes, Circle, CoerceTo, ConcatMap, Config, Contains, Count, DatumTerm, Day, DayOfWeek, DayOfYear, Db, DbCreate, DbDrop, DbList, Default, Delete, DeleteAt, Desc, Difference, Distance, Distinct, Div, Downcase, During, EpochTime, Eq, EqJoin, Fill, Filter, Floor, Fold, ForEach, FunCall, Func, Ge, Geojson, Get, GetAll, GetField, GetIntersecting, GetNearest, Grant, Group, Gt, HasFields, Hours, Http, ISO8601, ImplicitVar, InTimezone, Includes, IndexCreate, IndexDrop, IndexList, IndexRename, IndexStatus, IndexWait, Info, InnerJoin, Insert, InsertAt, Intersects, IsEmpty, JavaScript, Json, Keys, Le, Limit, Line, Literal, Lt, MakeArray, MakeObject, Map, Match, Max, Merge, Min, Minutes, Mod, Month, Mul, Ne, Not, Now, Nth, Object_, OffsetsOf, Or, OrderBy, OuterJoin, Pluck, Point, Polygon, PolygonSub, Prepend, Promise, RDBConstant, RDBOp, RDBVal, RQLDate, Random, Range, Rebalance, Reconfigure, Reduce, Replace, Round, Sample, Seconds, SetDifference, SetInsert, SetIntersection, SetUnion, Skip, Slice, SpliceAt, Split, Status, Sub, Sum, Sync, Table, TableCreate, TableDrop, TableList, TermBase, Time, TimeOfDay, Timezone, ToEpochTime, ToGeojson, ToISO8601, ToJsonString, TypeOf, UUID, Ungroup, Union, Upcase, Update, UserError, Values, Var, Wait, WithFields, Without, Year, Zip, ar, aropt, err, funcWrap, hasImplicit, intsp, intspallargs, kved, net, protoTermType, rethinkdb, shouldWrap, translateBackOptargs, translateOptargs, util, varar,
|
3 | slice = [].slice,
|
4 | hasProp = {}.hasOwnProperty,
|
5 | extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
6 |
|
7 | util = require('./util');
|
8 |
|
9 | err = require('./errors');
|
10 |
|
11 | net = require('./net');
|
12 |
|
13 | protoTermType = require('./proto-def').Term.TermType;
|
14 |
|
15 | Promise = require('bluebird');
|
16 |
|
17 | ar = util.ar;
|
18 |
|
19 | varar = util.varar;
|
20 |
|
21 | aropt = util.aropt;
|
22 |
|
23 | rethinkdb = function() {
|
24 | var args;
|
25 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
26 | return rethinkdb.expr.apply(rethinkdb, args);
|
27 | };
|
28 |
|
29 | funcWrap = function(val) {
|
30 | var ivarScan;
|
31 | if (val === void 0) {
|
32 | return val;
|
33 | }
|
34 | val = rethinkdb.expr(val);
|
35 | ivarScan = function(node) {
|
36 | var k, v;
|
37 | if (!(node instanceof TermBase)) {
|
38 | return false;
|
39 | }
|
40 | if (node instanceof ImplicitVar) {
|
41 | return true;
|
42 | }
|
43 | if ((node.args.map(ivarScan)).some(function(a) {
|
44 | return a;
|
45 | })) {
|
46 | return true;
|
47 | }
|
48 | if (((function() {
|
49 | var ref, results;
|
50 | ref = node.optargs;
|
51 | results = [];
|
52 | for (k in ref) {
|
53 | if (!hasProp.call(ref, k)) continue;
|
54 | v = ref[k];
|
55 | results.push(v);
|
56 | }
|
57 | return results;
|
58 | })()).map(ivarScan).some(function(a) {
|
59 | return a;
|
60 | })) {
|
61 | return true;
|
62 | }
|
63 | return false;
|
64 | };
|
65 | if (ivarScan(val)) {
|
66 | return new Func({}, function(x) {
|
67 | return val;
|
68 | });
|
69 | }
|
70 | return val;
|
71 | };
|
72 |
|
73 | hasImplicit = function(args) {
|
74 | var arg, j, len;
|
75 | if (Array.isArray(args)) {
|
76 | for (j = 0, len = args.length; j < len; j++) {
|
77 | arg = args[j];
|
78 | if (hasImplicit(arg) === true) {
|
79 | return true;
|
80 | }
|
81 | }
|
82 | } else if (args === 'r.row') {
|
83 | return true;
|
84 | }
|
85 | return false;
|
86 | };
|
87 |
|
88 | TermBase = (function() {
|
89 | TermBase.prototype.showRunWarning = true;
|
90 |
|
91 | function TermBase() {
|
92 | var self;
|
93 | if ({}.__proto__ !== void 0) {
|
94 | self = ar(function(field) {
|
95 | return self.bracket(field);
|
96 | });
|
97 | self.__proto__ = this.__proto__;
|
98 | return self;
|
99 | } else {
|
100 | return this;
|
101 | }
|
102 | }
|
103 |
|
104 | TermBase.prototype.run = function(connection, options, callback) {
|
105 | if (net.isConnection(connection) === true) {
|
106 | if (typeof options === "function") {
|
107 | if (callback === void 0) {
|
108 | callback = options;
|
109 | options = {};
|
110 | } else {
|
111 | return Promise.reject(new err.ReqlDriverError("Second argument to `run` cannot be a function if a third argument is provided.")).nodeify(options);
|
112 | }
|
113 | }
|
114 | } else if ((connection != null ? connection.constructor : void 0) === Object) {
|
115 | if (this.showRunWarning === true) {
|
116 | if (typeof process !== "undefined" && process !== null) {
|
117 | process.stderr.write("RethinkDB warning: This syntax is deprecated. Please use `run(connection[, options], callback)`.");
|
118 | }
|
119 | this.showRunWarning = false;
|
120 | }
|
121 | callback = options;
|
122 | options = connection;
|
123 | connection = connection.connection;
|
124 | delete options["connection"];
|
125 | }
|
126 | if (options == null) {
|
127 | options = {};
|
128 | }
|
129 | if ((callback != null) && typeof callback !== 'function') {
|
130 | return Promise.reject(new err.ReqlDriverError("If provided, the callback must be a function. Please use `run(connection[, options][, callback])"));
|
131 | }
|
132 | if (net.isConnection(connection) === false) {
|
133 | return Promise.reject(new err.ReqlDriverError("First argument to `run` must be an open connection.")).nodeify(callback);
|
134 | }
|
135 | return new Promise((function(_this) {
|
136 | return function(resolve, reject) {
|
137 | var e, error, wrappedCb;
|
138 | wrappedCb = function(err, result) {
|
139 | if (err != null) {
|
140 | return reject(err);
|
141 | } else {
|
142 | return resolve(result);
|
143 | }
|
144 | };
|
145 | try {
|
146 | return connection._start(_this, wrappedCb, options);
|
147 | } catch (error) {
|
148 | e = error;
|
149 | return wrappedCb(e);
|
150 | }
|
151 | };
|
152 | })(this)).nodeify(callback);
|
153 | };
|
154 |
|
155 | TermBase.prototype.toString = function() {
|
156 | return err.printQuery(this);
|
157 | };
|
158 |
|
159 | return TermBase;
|
160 |
|
161 | })();
|
162 |
|
163 | RDBVal = (function(superClass) {
|
164 | extend(RDBVal, superClass);
|
165 |
|
166 | function RDBVal() {
|
167 | return RDBVal.__super__.constructor.apply(this, arguments);
|
168 | }
|
169 |
|
170 | RDBVal.prototype.eq = function() {
|
171 | var args;
|
172 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
173 | return (function(func, args, ctor) {
|
174 | ctor.prototype = func.prototype;
|
175 | var child = new ctor, result = func.apply(child, args);
|
176 | return Object(result) === result ? result : child;
|
177 | })(Eq, [{}, this].concat(slice.call(args)), function(){});
|
178 | };
|
179 |
|
180 | RDBVal.prototype.ne = function() {
|
181 | var args;
|
182 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
183 | return (function(func, args, ctor) {
|
184 | ctor.prototype = func.prototype;
|
185 | var child = new ctor, result = func.apply(child, args);
|
186 | return Object(result) === result ? result : child;
|
187 | })(Ne, [{}, this].concat(slice.call(args)), function(){});
|
188 | };
|
189 |
|
190 | RDBVal.prototype.lt = function() {
|
191 | var args;
|
192 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
193 | return (function(func, args, ctor) {
|
194 | ctor.prototype = func.prototype;
|
195 | var child = new ctor, result = func.apply(child, args);
|
196 | return Object(result) === result ? result : child;
|
197 | })(Lt, [{}, this].concat(slice.call(args)), function(){});
|
198 | };
|
199 |
|
200 | RDBVal.prototype.le = function() {
|
201 | var args;
|
202 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
203 | return (function(func, args, ctor) {
|
204 | ctor.prototype = func.prototype;
|
205 | var child = new ctor, result = func.apply(child, args);
|
206 | return Object(result) === result ? result : child;
|
207 | })(Le, [{}, this].concat(slice.call(args)), function(){});
|
208 | };
|
209 |
|
210 | RDBVal.prototype.gt = function() {
|
211 | var args;
|
212 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
213 | return (function(func, args, ctor) {
|
214 | ctor.prototype = func.prototype;
|
215 | var child = new ctor, result = func.apply(child, args);
|
216 | return Object(result) === result ? result : child;
|
217 | })(Gt, [{}, this].concat(slice.call(args)), function(){});
|
218 | };
|
219 |
|
220 | RDBVal.prototype.ge = function() {
|
221 | var args;
|
222 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
223 | return (function(func, args, ctor) {
|
224 | ctor.prototype = func.prototype;
|
225 | var child = new ctor, result = func.apply(child, args);
|
226 | return Object(result) === result ? result : child;
|
227 | })(Ge, [{}, this].concat(slice.call(args)), function(){});
|
228 | };
|
229 |
|
230 | RDBVal.prototype.not = function() {
|
231 | var args;
|
232 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
233 | return (function(func, args, ctor) {
|
234 | ctor.prototype = func.prototype;
|
235 | var child = new ctor, result = func.apply(child, args);
|
236 | return Object(result) === result ? result : child;
|
237 | })(Not, [{}, this].concat(slice.call(args)), function(){});
|
238 | };
|
239 |
|
240 | RDBVal.prototype.add = function() {
|
241 | var args;
|
242 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
243 | return (function(func, args, ctor) {
|
244 | ctor.prototype = func.prototype;
|
245 | var child = new ctor, result = func.apply(child, args);
|
246 | return Object(result) === result ? result : child;
|
247 | })(Add, [{}, this].concat(slice.call(args)), function(){});
|
248 | };
|
249 |
|
250 | RDBVal.prototype.sub = function() {
|
251 | var args;
|
252 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
253 | return (function(func, args, ctor) {
|
254 | ctor.prototype = func.prototype;
|
255 | var child = new ctor, result = func.apply(child, args);
|
256 | return Object(result) === result ? result : child;
|
257 | })(Sub, [{}, this].concat(slice.call(args)), function(){});
|
258 | };
|
259 |
|
260 | RDBVal.prototype.mul = function() {
|
261 | var args;
|
262 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
263 | return (function(func, args, ctor) {
|
264 | ctor.prototype = func.prototype;
|
265 | var child = new ctor, result = func.apply(child, args);
|
266 | return Object(result) === result ? result : child;
|
267 | })(Mul, [{}, this].concat(slice.call(args)), function(){});
|
268 | };
|
269 |
|
270 | RDBVal.prototype.div = function() {
|
271 | var args;
|
272 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
273 | return (function(func, args, ctor) {
|
274 | ctor.prototype = func.prototype;
|
275 | var child = new ctor, result = func.apply(child, args);
|
276 | return Object(result) === result ? result : child;
|
277 | })(Div, [{}, this].concat(slice.call(args)), function(){});
|
278 | };
|
279 |
|
280 | RDBVal.prototype.mod = function() {
|
281 | var args;
|
282 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
283 | return (function(func, args, ctor) {
|
284 | ctor.prototype = func.prototype;
|
285 | var child = new ctor, result = func.apply(child, args);
|
286 | return Object(result) === result ? result : child;
|
287 | })(Mod, [{}, this].concat(slice.call(args)), function(){});
|
288 | };
|
289 |
|
290 | RDBVal.prototype.floor = function() {
|
291 | var args;
|
292 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
293 | return (function(func, args, ctor) {
|
294 | ctor.prototype = func.prototype;
|
295 | var child = new ctor, result = func.apply(child, args);
|
296 | return Object(result) === result ? result : child;
|
297 | })(Floor, [{}, this].concat(slice.call(args)), function(){});
|
298 | };
|
299 |
|
300 | RDBVal.prototype.ceil = function() {
|
301 | var args;
|
302 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
303 | return (function(func, args, ctor) {
|
304 | ctor.prototype = func.prototype;
|
305 | var child = new ctor, result = func.apply(child, args);
|
306 | return Object(result) === result ? result : child;
|
307 | })(Ceil, [{}, this].concat(slice.call(args)), function(){});
|
308 | };
|
309 |
|
310 | RDBVal.prototype.round = function() {
|
311 | var args;
|
312 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
313 | return (function(func, args, ctor) {
|
314 | ctor.prototype = func.prototype;
|
315 | var child = new ctor, result = func.apply(child, args);
|
316 | return Object(result) === result ? result : child;
|
317 | })(Round, [{}, this].concat(slice.call(args)), function(){});
|
318 | };
|
319 |
|
320 | RDBVal.prototype.append = function() {
|
321 | var args;
|
322 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
323 | return (function(func, args, ctor) {
|
324 | ctor.prototype = func.prototype;
|
325 | var child = new ctor, result = func.apply(child, args);
|
326 | return Object(result) === result ? result : child;
|
327 | })(Append, [{}, this].concat(slice.call(args)), function(){});
|
328 | };
|
329 |
|
330 | RDBVal.prototype.prepend = function() {
|
331 | var args;
|
332 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
333 | return (function(func, args, ctor) {
|
334 | ctor.prototype = func.prototype;
|
335 | var child = new ctor, result = func.apply(child, args);
|
336 | return Object(result) === result ? result : child;
|
337 | })(Prepend, [{}, this].concat(slice.call(args)), function(){});
|
338 | };
|
339 |
|
340 | RDBVal.prototype.difference = function() {
|
341 | var args;
|
342 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
343 | return (function(func, args, ctor) {
|
344 | ctor.prototype = func.prototype;
|
345 | var child = new ctor, result = func.apply(child, args);
|
346 | return Object(result) === result ? result : child;
|
347 | })(Difference, [{}, this].concat(slice.call(args)), function(){});
|
348 | };
|
349 |
|
350 | RDBVal.prototype.setInsert = function() {
|
351 | var args;
|
352 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
353 | return (function(func, args, ctor) {
|
354 | ctor.prototype = func.prototype;
|
355 | var child = new ctor, result = func.apply(child, args);
|
356 | return Object(result) === result ? result : child;
|
357 | })(SetInsert, [{}, this].concat(slice.call(args)), function(){});
|
358 | };
|
359 |
|
360 | RDBVal.prototype.setUnion = function() {
|
361 | var args;
|
362 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
363 | return (function(func, args, ctor) {
|
364 | ctor.prototype = func.prototype;
|
365 | var child = new ctor, result = func.apply(child, args);
|
366 | return Object(result) === result ? result : child;
|
367 | })(SetUnion, [{}, this].concat(slice.call(args)), function(){});
|
368 | };
|
369 |
|
370 | RDBVal.prototype.setIntersection = function() {
|
371 | var args;
|
372 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
373 | return (function(func, args, ctor) {
|
374 | ctor.prototype = func.prototype;
|
375 | var child = new ctor, result = func.apply(child, args);
|
376 | return Object(result) === result ? result : child;
|
377 | })(SetIntersection, [{}, this].concat(slice.call(args)), function(){});
|
378 | };
|
379 |
|
380 | RDBVal.prototype.setDifference = function() {
|
381 | var args;
|
382 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
383 | return (function(func, args, ctor) {
|
384 | ctor.prototype = func.prototype;
|
385 | var child = new ctor, result = func.apply(child, args);
|
386 | return Object(result) === result ? result : child;
|
387 | })(SetDifference, [{}, this].concat(slice.call(args)), function(){});
|
388 | };
|
389 |
|
390 | RDBVal.prototype.slice = varar(1, 3, function(left, right_or_opts, opts) {
|
391 | if (opts != null) {
|
392 | return new Slice(opts, this, left, right_or_opts);
|
393 | } else if (typeof right_or_opts !== 'undefined') {
|
394 | if ((Object.prototype.toString.call(right_or_opts) === '[object Object]') && !(right_or_opts instanceof TermBase)) {
|
395 | return new Slice(right_or_opts, this, left);
|
396 | } else {
|
397 | return new Slice({}, this, left, right_or_opts);
|
398 | }
|
399 | } else {
|
400 | return new Slice({}, this, left);
|
401 | }
|
402 | });
|
403 |
|
404 | RDBVal.prototype.skip = function() {
|
405 | var args;
|
406 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
407 | return (function(func, args, ctor) {
|
408 | ctor.prototype = func.prototype;
|
409 | var child = new ctor, result = func.apply(child, args);
|
410 | return Object(result) === result ? result : child;
|
411 | })(Skip, [{}, this].concat(slice.call(args)), function(){});
|
412 | };
|
413 |
|
414 | RDBVal.prototype.limit = function() {
|
415 | var args;
|
416 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
417 | return (function(func, args, ctor) {
|
418 | ctor.prototype = func.prototype;
|
419 | var child = new ctor, result = func.apply(child, args);
|
420 | return Object(result) === result ? result : child;
|
421 | })(Limit, [{}, this].concat(slice.call(args)), function(){});
|
422 | };
|
423 |
|
424 | RDBVal.prototype.getField = function() {
|
425 | var args;
|
426 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
427 | return (function(func, args, ctor) {
|
428 | ctor.prototype = func.prototype;
|
429 | var child = new ctor, result = func.apply(child, args);
|
430 | return Object(result) === result ? result : child;
|
431 | })(GetField, [{}, this].concat(slice.call(args)), function(){});
|
432 | };
|
433 |
|
434 | RDBVal.prototype.contains = function() {
|
435 | var args;
|
436 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
437 | return (function(func, args, ctor) {
|
438 | ctor.prototype = func.prototype;
|
439 | var child = new ctor, result = func.apply(child, args);
|
440 | return Object(result) === result ? result : child;
|
441 | })(Contains, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
442 | };
|
443 |
|
444 | RDBVal.prototype.insertAt = function() {
|
445 | var args;
|
446 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
447 | return (function(func, args, ctor) {
|
448 | ctor.prototype = func.prototype;
|
449 | var child = new ctor, result = func.apply(child, args);
|
450 | return Object(result) === result ? result : child;
|
451 | })(InsertAt, [{}, this].concat(slice.call(args)), function(){});
|
452 | };
|
453 |
|
454 | RDBVal.prototype.spliceAt = function() {
|
455 | var args;
|
456 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
457 | return (function(func, args, ctor) {
|
458 | ctor.prototype = func.prototype;
|
459 | var child = new ctor, result = func.apply(child, args);
|
460 | return Object(result) === result ? result : child;
|
461 | })(SpliceAt, [{}, this].concat(slice.call(args)), function(){});
|
462 | };
|
463 |
|
464 | RDBVal.prototype.deleteAt = function() {
|
465 | var args;
|
466 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
467 | return (function(func, args, ctor) {
|
468 | ctor.prototype = func.prototype;
|
469 | var child = new ctor, result = func.apply(child, args);
|
470 | return Object(result) === result ? result : child;
|
471 | })(DeleteAt, [{}, this].concat(slice.call(args)), function(){});
|
472 | };
|
473 |
|
474 | RDBVal.prototype.changeAt = function() {
|
475 | var args;
|
476 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
477 | return (function(func, args, ctor) {
|
478 | ctor.prototype = func.prototype;
|
479 | var child = new ctor, result = func.apply(child, args);
|
480 | return Object(result) === result ? result : child;
|
481 | })(ChangeAt, [{}, this].concat(slice.call(args)), function(){});
|
482 | };
|
483 |
|
484 | RDBVal.prototype.offsetsOf = function() {
|
485 | var args;
|
486 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
487 | return (function(func, args, ctor) {
|
488 | ctor.prototype = func.prototype;
|
489 | var child = new ctor, result = func.apply(child, args);
|
490 | return Object(result) === result ? result : child;
|
491 | })(OffsetsOf, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
492 | };
|
493 |
|
494 | RDBVal.prototype.hasFields = function() {
|
495 | var args;
|
496 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
497 | return (function(func, args, ctor) {
|
498 | ctor.prototype = func.prototype;
|
499 | var child = new ctor, result = func.apply(child, args);
|
500 | return Object(result) === result ? result : child;
|
501 | })(HasFields, [{}, this].concat(slice.call(args)), function(){});
|
502 | };
|
503 |
|
504 | RDBVal.prototype.withFields = function() {
|
505 | var args;
|
506 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
507 | return (function(func, args, ctor) {
|
508 | ctor.prototype = func.prototype;
|
509 | var child = new ctor, result = func.apply(child, args);
|
510 | return Object(result) === result ? result : child;
|
511 | })(WithFields, [{}, this].concat(slice.call(args)), function(){});
|
512 | };
|
513 |
|
514 | RDBVal.prototype.keys = function() {
|
515 | var args;
|
516 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
517 | return (function(func, args, ctor) {
|
518 | ctor.prototype = func.prototype;
|
519 | var child = new ctor, result = func.apply(child, args);
|
520 | return Object(result) === result ? result : child;
|
521 | })(Keys, [{}, this].concat(slice.call(args)), function(){});
|
522 | };
|
523 |
|
524 | RDBVal.prototype.values = function() {
|
525 | var args;
|
526 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
527 | return (function(func, args, ctor) {
|
528 | ctor.prototype = func.prototype;
|
529 | var child = new ctor, result = func.apply(child, args);
|
530 | return Object(result) === result ? result : child;
|
531 | })(Values, [{}, this].concat(slice.call(args)), function(){});
|
532 | };
|
533 |
|
534 | RDBVal.prototype.changes = aropt(function(opts) {
|
535 | return new Changes(opts, this);
|
536 | });
|
537 |
|
538 | RDBVal.prototype.pluck = function() {
|
539 | var args;
|
540 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
541 | return (function(func, args, ctor) {
|
542 | ctor.prototype = func.prototype;
|
543 | var child = new ctor, result = func.apply(child, args);
|
544 | return Object(result) === result ? result : child;
|
545 | })(Pluck, [{}, this].concat(slice.call(args)), function(){});
|
546 | };
|
547 |
|
548 | RDBVal.prototype.without = function() {
|
549 | var args;
|
550 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
551 | return (function(func, args, ctor) {
|
552 | ctor.prototype = func.prototype;
|
553 | var child = new ctor, result = func.apply(child, args);
|
554 | return Object(result) === result ? result : child;
|
555 | })(Without, [{}, this].concat(slice.call(args)), function(){});
|
556 | };
|
557 |
|
558 | RDBVal.prototype.merge = function() {
|
559 | var args;
|
560 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
561 | return (function(func, args, ctor) {
|
562 | ctor.prototype = func.prototype;
|
563 | var child = new ctor, result = func.apply(child, args);
|
564 | return Object(result) === result ? result : child;
|
565 | })(Merge, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
566 | };
|
567 |
|
568 | RDBVal.prototype.between = aropt(function(left, right, opts) {
|
569 | return new Between(opts, this, left, right);
|
570 | });
|
571 |
|
572 | RDBVal.prototype.reduce = function() {
|
573 | var args;
|
574 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
575 | return (function(func, args, ctor) {
|
576 | ctor.prototype = func.prototype;
|
577 | var child = new ctor, result = func.apply(child, args);
|
578 | return Object(result) === result ? result : child;
|
579 | })(Reduce, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
580 | };
|
581 |
|
582 | RDBVal.prototype.map = varar(1, null, function() {
|
583 | var args, funcArg, j;
|
584 | args = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), funcArg = arguments[j++];
|
585 | return (function(func, args, ctor) {
|
586 | ctor.prototype = func.prototype;
|
587 | var child = new ctor, result = func.apply(child, args);
|
588 | return Object(result) === result ? result : child;
|
589 | })(Map, [{}, this].concat(slice.call(args), [funcWrap(funcArg)]), function(){});
|
590 | });
|
591 |
|
592 | RDBVal.prototype.fold = aropt(function(baseArg, accFuncArg, opts) {
|
593 | return new Fold(opts, this, baseArg, funcWrap(accFuncArg));
|
594 | });
|
595 |
|
596 | RDBVal.prototype.filter = aropt(function(predicate, opts) {
|
597 | return new Filter(opts, this, funcWrap(predicate));
|
598 | });
|
599 |
|
600 | RDBVal.prototype.concatMap = function() {
|
601 | var args;
|
602 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
603 | return (function(func, args, ctor) {
|
604 | ctor.prototype = func.prototype;
|
605 | var child = new ctor, result = func.apply(child, args);
|
606 | return Object(result) === result ? result : child;
|
607 | })(ConcatMap, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
608 | };
|
609 |
|
610 | RDBVal.prototype.distinct = aropt(function(opts) {
|
611 | return new Distinct(opts, this);
|
612 | });
|
613 |
|
614 | RDBVal.prototype.count = function() {
|
615 | var args;
|
616 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
617 | return (function(func, args, ctor) {
|
618 | ctor.prototype = func.prototype;
|
619 | var child = new ctor, result = func.apply(child, args);
|
620 | return Object(result) === result ? result : child;
|
621 | })(Count, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
622 | };
|
623 |
|
624 | RDBVal.prototype.union = function() {
|
625 | var attr, attrs, attrsAndOpts, opts, perhapsOptDict;
|
626 | attrsAndOpts = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
627 | opts = {};
|
628 | attrs = attrsAndOpts;
|
629 | perhapsOptDict = attrsAndOpts[attrsAndOpts.length - 1];
|
630 | if (perhapsOptDict && (Object.prototype.toString.call(perhapsOptDict) === '[object Object]') && !(perhapsOptDict instanceof TermBase)) {
|
631 | opts = perhapsOptDict;
|
632 | attrs = attrsAndOpts.slice(0, attrsAndOpts.length - 1);
|
633 | }
|
634 | attrs = (function() {
|
635 | var j, len, results;
|
636 | results = [];
|
637 | for (j = 0, len = attrs.length; j < len; j++) {
|
638 | attr = attrs[j];
|
639 | if (attr instanceof Asc || attr instanceof Desc) {
|
640 | results.push(attr);
|
641 | } else {
|
642 | results.push(funcWrap(attr));
|
643 | }
|
644 | }
|
645 | return results;
|
646 | })();
|
647 | return (function(func, args, ctor) {
|
648 | ctor.prototype = func.prototype;
|
649 | var child = new ctor, result = func.apply(child, args);
|
650 | return Object(result) === result ? result : child;
|
651 | })(Union, [opts, this].concat(slice.call(attrs)), function(){});
|
652 | };
|
653 |
|
654 | RDBVal.prototype.nth = function() {
|
655 | var args;
|
656 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
657 | return (function(func, args, ctor) {
|
658 | ctor.prototype = func.prototype;
|
659 | var child = new ctor, result = func.apply(child, args);
|
660 | return Object(result) === result ? result : child;
|
661 | })(Nth, [{}, this].concat(slice.call(args)), function(){});
|
662 | };
|
663 |
|
664 | RDBVal.prototype.bracket = function() {
|
665 | var args;
|
666 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
667 | return (function(func, args, ctor) {
|
668 | ctor.prototype = func.prototype;
|
669 | var child = new ctor, result = func.apply(child, args);
|
670 | return Object(result) === result ? result : child;
|
671 | })(Bracket, [{}, this].concat(slice.call(args)), function(){});
|
672 | };
|
673 |
|
674 | RDBVal.prototype.toJSON = function() {
|
675 | var args;
|
676 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
677 | return (function(func, args, ctor) {
|
678 | ctor.prototype = func.prototype;
|
679 | var child = new ctor, result = func.apply(child, args);
|
680 | return Object(result) === result ? result : child;
|
681 | })(ToJsonString, [{}, this].concat(slice.call(args)), function(){});
|
682 | };
|
683 |
|
684 | RDBVal.prototype.toJsonString = function() {
|
685 | var args;
|
686 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
687 | return (function(func, args, ctor) {
|
688 | ctor.prototype = func.prototype;
|
689 | var child = new ctor, result = func.apply(child, args);
|
690 | return Object(result) === result ? result : child;
|
691 | })(ToJsonString, [{}, this].concat(slice.call(args)), function(){});
|
692 | };
|
693 |
|
694 | RDBVal.prototype.match = function() {
|
695 | var args;
|
696 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
697 | return (function(func, args, ctor) {
|
698 | ctor.prototype = func.prototype;
|
699 | var child = new ctor, result = func.apply(child, args);
|
700 | return Object(result) === result ? result : child;
|
701 | })(Match, [{}, this].concat(slice.call(args)), function(){});
|
702 | };
|
703 |
|
704 | RDBVal.prototype.split = function() {
|
705 | var args;
|
706 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
707 | return (function(func, args, ctor) {
|
708 | ctor.prototype = func.prototype;
|
709 | var child = new ctor, result = func.apply(child, args);
|
710 | return Object(result) === result ? result : child;
|
711 | })(Split, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
712 | };
|
713 |
|
714 | RDBVal.prototype.upcase = function() {
|
715 | var args;
|
716 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
717 | return (function(func, args, ctor) {
|
718 | ctor.prototype = func.prototype;
|
719 | var child = new ctor, result = func.apply(child, args);
|
720 | return Object(result) === result ? result : child;
|
721 | })(Upcase, [{}, this].concat(slice.call(args)), function(){});
|
722 | };
|
723 |
|
724 | RDBVal.prototype.downcase = function() {
|
725 | var args;
|
726 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
727 | return (function(func, args, ctor) {
|
728 | ctor.prototype = func.prototype;
|
729 | var child = new ctor, result = func.apply(child, args);
|
730 | return Object(result) === result ? result : child;
|
731 | })(Downcase, [{}, this].concat(slice.call(args)), function(){});
|
732 | };
|
733 |
|
734 | RDBVal.prototype.isEmpty = function() {
|
735 | var args;
|
736 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
737 | return (function(func, args, ctor) {
|
738 | ctor.prototype = func.prototype;
|
739 | var child = new ctor, result = func.apply(child, args);
|
740 | return Object(result) === result ? result : child;
|
741 | })(IsEmpty, [{}, this].concat(slice.call(args)), function(){});
|
742 | };
|
743 |
|
744 | RDBVal.prototype.innerJoin = function() {
|
745 | var args;
|
746 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
747 | return (function(func, args, ctor) {
|
748 | ctor.prototype = func.prototype;
|
749 | var child = new ctor, result = func.apply(child, args);
|
750 | return Object(result) === result ? result : child;
|
751 | })(InnerJoin, [{}, this].concat(slice.call(args)), function(){});
|
752 | };
|
753 |
|
754 | RDBVal.prototype.outerJoin = function() {
|
755 | var args;
|
756 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
757 | return (function(func, args, ctor) {
|
758 | ctor.prototype = func.prototype;
|
759 | var child = new ctor, result = func.apply(child, args);
|
760 | return Object(result) === result ? result : child;
|
761 | })(OuterJoin, [{}, this].concat(slice.call(args)), function(){});
|
762 | };
|
763 |
|
764 | RDBVal.prototype.eqJoin = aropt(function(left_attr, right, opts) {
|
765 | return new EqJoin(opts, this, funcWrap(left_attr), right);
|
766 | });
|
767 |
|
768 | RDBVal.prototype.zip = function() {
|
769 | var args;
|
770 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
771 | return (function(func, args, ctor) {
|
772 | ctor.prototype = func.prototype;
|
773 | var child = new ctor, result = func.apply(child, args);
|
774 | return Object(result) === result ? result : child;
|
775 | })(Zip, [{}, this].concat(slice.call(args)), function(){});
|
776 | };
|
777 |
|
778 | RDBVal.prototype.coerceTo = function() {
|
779 | var args;
|
780 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
781 | return (function(func, args, ctor) {
|
782 | ctor.prototype = func.prototype;
|
783 | var child = new ctor, result = func.apply(child, args);
|
784 | return Object(result) === result ? result : child;
|
785 | })(CoerceTo, [{}, this].concat(slice.call(args)), function(){});
|
786 | };
|
787 |
|
788 | RDBVal.prototype.ungroup = function() {
|
789 | var args;
|
790 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
791 | return (function(func, args, ctor) {
|
792 | ctor.prototype = func.prototype;
|
793 | var child = new ctor, result = func.apply(child, args);
|
794 | return Object(result) === result ? result : child;
|
795 | })(Ungroup, [{}, this].concat(slice.call(args)), function(){});
|
796 | };
|
797 |
|
798 | RDBVal.prototype.typeOf = function() {
|
799 | var args;
|
800 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
801 | return (function(func, args, ctor) {
|
802 | ctor.prototype = func.prototype;
|
803 | var child = new ctor, result = func.apply(child, args);
|
804 | return Object(result) === result ? result : child;
|
805 | })(TypeOf, [{}, this].concat(slice.call(args)), function(){});
|
806 | };
|
807 |
|
808 | RDBVal.prototype.update = aropt(function(func, opts) {
|
809 | return new Update(opts, this, funcWrap(func));
|
810 | });
|
811 |
|
812 | RDBVal.prototype["delete"] = aropt(function(opts) {
|
813 | return new Delete(opts, this);
|
814 | });
|
815 |
|
816 | RDBVal.prototype.replace = aropt(function(func, opts) {
|
817 | return new Replace(opts, this, funcWrap(func));
|
818 | });
|
819 |
|
820 | RDBVal.prototype["do"] = function() {
|
821 | var args;
|
822 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
823 | return (function(func, args, ctor) {
|
824 | ctor.prototype = func.prototype;
|
825 | var child = new ctor, result = func.apply(child, args);
|
826 | return Object(result) === result ? result : child;
|
827 | })(FunCall, [{}, funcWrap(args.slice(-1)[0]), this].concat(slice.call(args.slice(0, -1))), function(){});
|
828 | };
|
829 |
|
830 | RDBVal.prototype["default"] = function() {
|
831 | var args;
|
832 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
833 | return (function(func, args, ctor) {
|
834 | ctor.prototype = func.prototype;
|
835 | var child = new ctor, result = func.apply(child, args);
|
836 | return Object(result) === result ? result : child;
|
837 | })(Default, [{}, this].concat(slice.call(args)), function(){});
|
838 | };
|
839 |
|
840 | RDBVal.prototype.or = function() {
|
841 | var args;
|
842 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
843 | return (function(func, args, ctor) {
|
844 | ctor.prototype = func.prototype;
|
845 | var child = new ctor, result = func.apply(child, args);
|
846 | return Object(result) === result ? result : child;
|
847 | })(Or, [{}, this].concat(slice.call(args)), function(){});
|
848 | };
|
849 |
|
850 | RDBVal.prototype.and = function() {
|
851 | var args;
|
852 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
853 | return (function(func, args, ctor) {
|
854 | ctor.prototype = func.prototype;
|
855 | var child = new ctor, result = func.apply(child, args);
|
856 | return Object(result) === result ? result : child;
|
857 | })(And, [{}, this].concat(slice.call(args)), function(){});
|
858 | };
|
859 |
|
860 | RDBVal.prototype.branch = function() {
|
861 | var args;
|
862 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
863 | return (function(func, args, ctor) {
|
864 | ctor.prototype = func.prototype;
|
865 | var child = new ctor, result = func.apply(child, args);
|
866 | return Object(result) === result ? result : child;
|
867 | })(Branch, [{}, this].concat(slice.call(args)), function(){});
|
868 | };
|
869 |
|
870 | RDBVal.prototype.forEach = function() {
|
871 | var args;
|
872 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
873 | return (function(func, args, ctor) {
|
874 | ctor.prototype = func.prototype;
|
875 | var child = new ctor, result = func.apply(child, args);
|
876 | return Object(result) === result ? result : child;
|
877 | })(ForEach, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
878 | };
|
879 |
|
880 | RDBVal.prototype.sum = function() {
|
881 | var args;
|
882 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
883 | return (function(func, args, ctor) {
|
884 | ctor.prototype = func.prototype;
|
885 | var child = new ctor, result = func.apply(child, args);
|
886 | return Object(result) === result ? result : child;
|
887 | })(Sum, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
888 | };
|
889 |
|
890 | RDBVal.prototype.avg = function() {
|
891 | var args;
|
892 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
893 | return (function(func, args, ctor) {
|
894 | ctor.prototype = func.prototype;
|
895 | var child = new ctor, result = func.apply(child, args);
|
896 | return Object(result) === result ? result : child;
|
897 | })(Avg, [{}, this].concat(slice.call(args.map(funcWrap))), function(){});
|
898 | };
|
899 |
|
900 | RDBVal.prototype.info = function() {
|
901 | var args;
|
902 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
903 | return (function(func, args, ctor) {
|
904 | ctor.prototype = func.prototype;
|
905 | var child = new ctor, result = func.apply(child, args);
|
906 | return Object(result) === result ? result : child;
|
907 | })(Info, [{}, this].concat(slice.call(args)), function(){});
|
908 | };
|
909 |
|
910 | RDBVal.prototype.sample = function() {
|
911 | var args;
|
912 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
913 | return (function(func, args, ctor) {
|
914 | ctor.prototype = func.prototype;
|
915 | var child = new ctor, result = func.apply(child, args);
|
916 | return Object(result) === result ? result : child;
|
917 | })(Sample, [{}, this].concat(slice.call(args)), function(){});
|
918 | };
|
919 |
|
920 | RDBVal.prototype.group = function() {
|
921 | var fields, fieldsAndOpts, opts, perhapsOptDict;
|
922 | fieldsAndOpts = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
923 | opts = {};
|
924 | fields = fieldsAndOpts;
|
925 | if (fieldsAndOpts.length > 0) {
|
926 | perhapsOptDict = fieldsAndOpts[fieldsAndOpts.length - 1];
|
927 | if (perhapsOptDict && (Object.prototype.toString.call(perhapsOptDict) === '[object Object]') && !(perhapsOptDict instanceof TermBase)) {
|
928 | opts = perhapsOptDict;
|
929 | fields = fieldsAndOpts.slice(0, fieldsAndOpts.length - 1);
|
930 | }
|
931 | }
|
932 | return (function(func, args, ctor) {
|
933 | ctor.prototype = func.prototype;
|
934 | var child = new ctor, result = func.apply(child, args);
|
935 | return Object(result) === result ? result : child;
|
936 | })(Group, [opts, this].concat(slice.call(fields.map(funcWrap))), function(){});
|
937 | };
|
938 |
|
939 | RDBVal.prototype.orderBy = function() {
|
940 | var attr, attrs, attrsAndOpts, opts, perhapsOptDict;
|
941 | attrsAndOpts = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
942 | opts = {};
|
943 | attrs = attrsAndOpts;
|
944 | perhapsOptDict = attrsAndOpts[attrsAndOpts.length - 1];
|
945 | if (perhapsOptDict && (Object.prototype.toString.call(perhapsOptDict) === '[object Object]') && !(perhapsOptDict instanceof TermBase)) {
|
946 | opts = perhapsOptDict;
|
947 | attrs = attrsAndOpts.slice(0, attrsAndOpts.length - 1);
|
948 | }
|
949 | attrs = (function() {
|
950 | var j, len, results;
|
951 | results = [];
|
952 | for (j = 0, len = attrs.length; j < len; j++) {
|
953 | attr = attrs[j];
|
954 | if (attr instanceof Asc || attr instanceof Desc) {
|
955 | results.push(attr);
|
956 | } else {
|
957 | results.push(funcWrap(attr));
|
958 | }
|
959 | }
|
960 | return results;
|
961 | })();
|
962 | return (function(func, args, ctor) {
|
963 | ctor.prototype = func.prototype;
|
964 | var child = new ctor, result = func.apply(child, args);
|
965 | return Object(result) === result ? result : child;
|
966 | })(OrderBy, [opts, this].concat(slice.call(attrs)), function(){});
|
967 | };
|
968 |
|
969 | RDBVal.prototype.toGeojson = function() {
|
970 | var args;
|
971 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
972 | return (function(func, args, ctor) {
|
973 | ctor.prototype = func.prototype;
|
974 | var child = new ctor, result = func.apply(child, args);
|
975 | return Object(result) === result ? result : child;
|
976 | })(ToGeojson, [{}, this].concat(slice.call(args)), function(){});
|
977 | };
|
978 |
|
979 | RDBVal.prototype.distance = aropt(function(g, opts) {
|
980 | return new Distance(opts, this, g);
|
981 | });
|
982 |
|
983 | RDBVal.prototype.intersects = function() {
|
984 | var args;
|
985 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
986 | return (function(func, args, ctor) {
|
987 | ctor.prototype = func.prototype;
|
988 | var child = new ctor, result = func.apply(child, args);
|
989 | return Object(result) === result ? result : child;
|
990 | })(Intersects, [{}, this].concat(slice.call(args)), function(){});
|
991 | };
|
992 |
|
993 | RDBVal.prototype.includes = function() {
|
994 | var args;
|
995 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
996 | return (function(func, args, ctor) {
|
997 | ctor.prototype = func.prototype;
|
998 | var child = new ctor, result = func.apply(child, args);
|
999 | return Object(result) === result ? result : child;
|
1000 | })(Includes, [{}, this].concat(slice.call(args)), function(){});
|
1001 | };
|
1002 |
|
1003 | RDBVal.prototype.fill = function() {
|
1004 | var args;
|
1005 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1006 | return (function(func, args, ctor) {
|
1007 | ctor.prototype = func.prototype;
|
1008 | var child = new ctor, result = func.apply(child, args);
|
1009 | return Object(result) === result ? result : child;
|
1010 | })(Fill, [{}, this].concat(slice.call(args)), function(){});
|
1011 | };
|
1012 |
|
1013 | RDBVal.prototype.polygonSub = function() {
|
1014 | var args;
|
1015 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1016 | return (function(func, args, ctor) {
|
1017 | ctor.prototype = func.prototype;
|
1018 | var child = new ctor, result = func.apply(child, args);
|
1019 | return Object(result) === result ? result : child;
|
1020 | })(PolygonSub, [{}, this].concat(slice.call(args)), function(){});
|
1021 | };
|
1022 |
|
1023 | RDBVal.prototype.tableCreate = aropt(function(tblName, opts) {
|
1024 | return new TableCreate(opts, this, tblName);
|
1025 | });
|
1026 |
|
1027 | RDBVal.prototype.tableDrop = function() {
|
1028 | var args;
|
1029 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1030 | return (function(func, args, ctor) {
|
1031 | ctor.prototype = func.prototype;
|
1032 | var child = new ctor, result = func.apply(child, args);
|
1033 | return Object(result) === result ? result : child;
|
1034 | })(TableDrop, [{}, this].concat(slice.call(args)), function(){});
|
1035 | };
|
1036 |
|
1037 | RDBVal.prototype.tableList = function() {
|
1038 | var args;
|
1039 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1040 | return (function(func, args, ctor) {
|
1041 | ctor.prototype = func.prototype;
|
1042 | var child = new ctor, result = func.apply(child, args);
|
1043 | return Object(result) === result ? result : child;
|
1044 | })(TableList, [{}, this].concat(slice.call(args)), function(){});
|
1045 | };
|
1046 |
|
1047 | RDBVal.prototype.config = function() {
|
1048 | return new Config({}, this);
|
1049 | };
|
1050 |
|
1051 | RDBVal.prototype.status = function() {
|
1052 | return new Status({}, this);
|
1053 | };
|
1054 |
|
1055 | RDBVal.prototype.wait = aropt(function(opts) {
|
1056 | return new Wait(opts, this);
|
1057 | });
|
1058 |
|
1059 | RDBVal.prototype.table = aropt(function(tblName, opts) {
|
1060 | return new Table(opts, this, tblName);
|
1061 | });
|
1062 |
|
1063 | RDBVal.prototype.get = function() {
|
1064 | var args;
|
1065 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1066 | return (function(func, args, ctor) {
|
1067 | ctor.prototype = func.prototype;
|
1068 | var child = new ctor, result = func.apply(child, args);
|
1069 | return Object(result) === result ? result : child;
|
1070 | })(Get, [{}, this].concat(slice.call(args)), function(){});
|
1071 | };
|
1072 |
|
1073 | RDBVal.prototype.getAll = function() {
|
1074 | var keys, keysAndOpts, opts, perhapsOptDict;
|
1075 | keysAndOpts = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1076 | opts = {};
|
1077 | keys = keysAndOpts;
|
1078 | if (keysAndOpts.length > 1) {
|
1079 | perhapsOptDict = keysAndOpts[keysAndOpts.length - 1];
|
1080 | if (perhapsOptDict && ((Object.prototype.toString.call(perhapsOptDict) === '[object Object]') && !(perhapsOptDict instanceof TermBase))) {
|
1081 | opts = perhapsOptDict;
|
1082 | keys = keysAndOpts.slice(0, keysAndOpts.length - 1);
|
1083 | }
|
1084 | }
|
1085 | return (function(func, args, ctor) {
|
1086 | ctor.prototype = func.prototype;
|
1087 | var child = new ctor, result = func.apply(child, args);
|
1088 | return Object(result) === result ? result : child;
|
1089 | })(GetAll, [opts, this].concat(slice.call(keys)), function(){});
|
1090 | };
|
1091 |
|
1092 | RDBVal.prototype.min = function() {
|
1093 | var keys, keysAndOpts, opts, perhapsOptDict;
|
1094 | keysAndOpts = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1095 | opts = {};
|
1096 | keys = keysAndOpts;
|
1097 | if (keysAndOpts.length === 1) {
|
1098 | perhapsOptDict = keysAndOpts[0];
|
1099 | if (perhapsOptDict && ((Object.prototype.toString.call(perhapsOptDict) === '[object Object]') && !(perhapsOptDict instanceof TermBase))) {
|
1100 | opts = perhapsOptDict;
|
1101 | keys = [];
|
1102 | }
|
1103 | }
|
1104 | return (function(func, args, ctor) {
|
1105 | ctor.prototype = func.prototype;
|
1106 | var child = new ctor, result = func.apply(child, args);
|
1107 | return Object(result) === result ? result : child;
|
1108 | })(Min, [opts, this].concat(slice.call(keys.map(funcWrap))), function(){});
|
1109 | };
|
1110 |
|
1111 | RDBVal.prototype.max = function() {
|
1112 | var keys, keysAndOpts, opts, perhapsOptDict;
|
1113 | keysAndOpts = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1114 | opts = {};
|
1115 | keys = keysAndOpts;
|
1116 | if (keysAndOpts.length === 1) {
|
1117 | perhapsOptDict = keysAndOpts[0];
|
1118 | if (perhapsOptDict && ((Object.prototype.toString.call(perhapsOptDict) === '[object Object]') && !(perhapsOptDict instanceof TermBase))) {
|
1119 | opts = perhapsOptDict;
|
1120 | keys = [];
|
1121 | }
|
1122 | }
|
1123 | return (function(func, args, ctor) {
|
1124 | ctor.prototype = func.prototype;
|
1125 | var child = new ctor, result = func.apply(child, args);
|
1126 | return Object(result) === result ? result : child;
|
1127 | })(Max, [opts, this].concat(slice.call(keys.map(funcWrap))), function(){});
|
1128 | };
|
1129 |
|
1130 | RDBVal.prototype.insert = aropt(function(doc, opts) {
|
1131 | return new Insert(opts, this, rethinkdb.expr(doc));
|
1132 | });
|
1133 |
|
1134 | RDBVal.prototype.indexCreate = varar(1, 3, function(name, defun_or_opts, opts) {
|
1135 | if (opts != null) {
|
1136 | return new IndexCreate(opts, this, name, funcWrap(defun_or_opts));
|
1137 | } else if (defun_or_opts != null) {
|
1138 | if ((Object.prototype.toString.call(defun_or_opts) === '[object Object]') && !(typeof defun_or_opts === 'function') && !(defun_or_opts instanceof TermBase)) {
|
1139 | return new IndexCreate(defun_or_opts, this, name);
|
1140 | } else {
|
1141 | return new IndexCreate({}, this, name, funcWrap(defun_or_opts));
|
1142 | }
|
1143 | } else {
|
1144 | return new IndexCreate({}, this, name);
|
1145 | }
|
1146 | });
|
1147 |
|
1148 | RDBVal.prototype.indexDrop = function() {
|
1149 | var args;
|
1150 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1151 | return (function(func, args, ctor) {
|
1152 | ctor.prototype = func.prototype;
|
1153 | var child = new ctor, result = func.apply(child, args);
|
1154 | return Object(result) === result ? result : child;
|
1155 | })(IndexDrop, [{}, this].concat(slice.call(args)), function(){});
|
1156 | };
|
1157 |
|
1158 | RDBVal.prototype.indexList = function() {
|
1159 | var args;
|
1160 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1161 | return (function(func, args, ctor) {
|
1162 | ctor.prototype = func.prototype;
|
1163 | var child = new ctor, result = func.apply(child, args);
|
1164 | return Object(result) === result ? result : child;
|
1165 | })(IndexList, [{}, this].concat(slice.call(args)), function(){});
|
1166 | };
|
1167 |
|
1168 | RDBVal.prototype.indexStatus = function() {
|
1169 | var args;
|
1170 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1171 | return (function(func, args, ctor) {
|
1172 | ctor.prototype = func.prototype;
|
1173 | var child = new ctor, result = func.apply(child, args);
|
1174 | return Object(result) === result ? result : child;
|
1175 | })(IndexStatus, [{}, this].concat(slice.call(args)), function(){});
|
1176 | };
|
1177 |
|
1178 | RDBVal.prototype.indexWait = function() {
|
1179 | var args;
|
1180 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1181 | return (function(func, args, ctor) {
|
1182 | ctor.prototype = func.prototype;
|
1183 | var child = new ctor, result = func.apply(child, args);
|
1184 | return Object(result) === result ? result : child;
|
1185 | })(IndexWait, [{}, this].concat(slice.call(args)), function(){});
|
1186 | };
|
1187 |
|
1188 | RDBVal.prototype.indexRename = aropt(function(old_name, new_name, opts) {
|
1189 | return new IndexRename(opts, this, old_name, new_name);
|
1190 | });
|
1191 |
|
1192 | RDBVal.prototype.reconfigure = function(opts) {
|
1193 | return new Reconfigure(opts, this);
|
1194 | };
|
1195 |
|
1196 | RDBVal.prototype.rebalance = function() {
|
1197 | return new Rebalance({}, this);
|
1198 | };
|
1199 |
|
1200 | RDBVal.prototype.sync = function() {
|
1201 | var args;
|
1202 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1203 | return (function(func, args, ctor) {
|
1204 | ctor.prototype = func.prototype;
|
1205 | var child = new ctor, result = func.apply(child, args);
|
1206 | return Object(result) === result ? result : child;
|
1207 | })(Sync, [{}, this].concat(slice.call(args)), function(){});
|
1208 | };
|
1209 |
|
1210 | RDBVal.prototype.grant = function() {
|
1211 | var args;
|
1212 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1213 | return (function(func, args, ctor) {
|
1214 | ctor.prototype = func.prototype;
|
1215 | var child = new ctor, result = func.apply(child, args);
|
1216 | return Object(result) === result ? result : child;
|
1217 | })(Grant, [{}, this].concat(slice.call(args)), function(){});
|
1218 | };
|
1219 |
|
1220 | RDBVal.prototype.toISO8601 = function() {
|
1221 | var args;
|
1222 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1223 | return (function(func, args, ctor) {
|
1224 | ctor.prototype = func.prototype;
|
1225 | var child = new ctor, result = func.apply(child, args);
|
1226 | return Object(result) === result ? result : child;
|
1227 | })(ToISO8601, [{}, this].concat(slice.call(args)), function(){});
|
1228 | };
|
1229 |
|
1230 | RDBVal.prototype.toEpochTime = function() {
|
1231 | var args;
|
1232 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1233 | return (function(func, args, ctor) {
|
1234 | ctor.prototype = func.prototype;
|
1235 | var child = new ctor, result = func.apply(child, args);
|
1236 | return Object(result) === result ? result : child;
|
1237 | })(ToEpochTime, [{}, this].concat(slice.call(args)), function(){});
|
1238 | };
|
1239 |
|
1240 | RDBVal.prototype.inTimezone = function() {
|
1241 | var args;
|
1242 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1243 | return (function(func, args, ctor) {
|
1244 | ctor.prototype = func.prototype;
|
1245 | var child = new ctor, result = func.apply(child, args);
|
1246 | return Object(result) === result ? result : child;
|
1247 | })(InTimezone, [{}, this].concat(slice.call(args)), function(){});
|
1248 | };
|
1249 |
|
1250 | RDBVal.prototype.during = aropt(function(t2, t3, opts) {
|
1251 | return new During(opts, this, t2, t3);
|
1252 | });
|
1253 |
|
1254 | RDBVal.prototype.date = function() {
|
1255 | var args;
|
1256 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1257 | return (function(func, args, ctor) {
|
1258 | ctor.prototype = func.prototype;
|
1259 | var child = new ctor, result = func.apply(child, args);
|
1260 | return Object(result) === result ? result : child;
|
1261 | })(RQLDate, [{}, this].concat(slice.call(args)), function(){});
|
1262 | };
|
1263 |
|
1264 | RDBVal.prototype.timeOfDay = function() {
|
1265 | var args;
|
1266 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1267 | return (function(func, args, ctor) {
|
1268 | ctor.prototype = func.prototype;
|
1269 | var child = new ctor, result = func.apply(child, args);
|
1270 | return Object(result) === result ? result : child;
|
1271 | })(TimeOfDay, [{}, this].concat(slice.call(args)), function(){});
|
1272 | };
|
1273 |
|
1274 | RDBVal.prototype.timezone = function() {
|
1275 | var args;
|
1276 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1277 | return (function(func, args, ctor) {
|
1278 | ctor.prototype = func.prototype;
|
1279 | var child = new ctor, result = func.apply(child, args);
|
1280 | return Object(result) === result ? result : child;
|
1281 | })(Timezone, [{}, this].concat(slice.call(args)), function(){});
|
1282 | };
|
1283 |
|
1284 | RDBVal.prototype.year = function() {
|
1285 | var args;
|
1286 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1287 | return (function(func, args, ctor) {
|
1288 | ctor.prototype = func.prototype;
|
1289 | var child = new ctor, result = func.apply(child, args);
|
1290 | return Object(result) === result ? result : child;
|
1291 | })(Year, [{}, this].concat(slice.call(args)), function(){});
|
1292 | };
|
1293 |
|
1294 | RDBVal.prototype.month = function() {
|
1295 | var args;
|
1296 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1297 | return (function(func, args, ctor) {
|
1298 | ctor.prototype = func.prototype;
|
1299 | var child = new ctor, result = func.apply(child, args);
|
1300 | return Object(result) === result ? result : child;
|
1301 | })(Month, [{}, this].concat(slice.call(args)), function(){});
|
1302 | };
|
1303 |
|
1304 | RDBVal.prototype.day = function() {
|
1305 | var args;
|
1306 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1307 | return (function(func, args, ctor) {
|
1308 | ctor.prototype = func.prototype;
|
1309 | var child = new ctor, result = func.apply(child, args);
|
1310 | return Object(result) === result ? result : child;
|
1311 | })(Day, [{}, this].concat(slice.call(args)), function(){});
|
1312 | };
|
1313 |
|
1314 | RDBVal.prototype.dayOfWeek = function() {
|
1315 | var args;
|
1316 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1317 | return (function(func, args, ctor) {
|
1318 | ctor.prototype = func.prototype;
|
1319 | var child = new ctor, result = func.apply(child, args);
|
1320 | return Object(result) === result ? result : child;
|
1321 | })(DayOfWeek, [{}, this].concat(slice.call(args)), function(){});
|
1322 | };
|
1323 |
|
1324 | RDBVal.prototype.dayOfYear = function() {
|
1325 | var args;
|
1326 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1327 | return (function(func, args, ctor) {
|
1328 | ctor.prototype = func.prototype;
|
1329 | var child = new ctor, result = func.apply(child, args);
|
1330 | return Object(result) === result ? result : child;
|
1331 | })(DayOfYear, [{}, this].concat(slice.call(args)), function(){});
|
1332 | };
|
1333 |
|
1334 | RDBVal.prototype.hours = function() {
|
1335 | var args;
|
1336 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1337 | return (function(func, args, ctor) {
|
1338 | ctor.prototype = func.prototype;
|
1339 | var child = new ctor, result = func.apply(child, args);
|
1340 | return Object(result) === result ? result : child;
|
1341 | })(Hours, [{}, this].concat(slice.call(args)), function(){});
|
1342 | };
|
1343 |
|
1344 | RDBVal.prototype.minutes = function() {
|
1345 | var args;
|
1346 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1347 | return (function(func, args, ctor) {
|
1348 | ctor.prototype = func.prototype;
|
1349 | var child = new ctor, result = func.apply(child, args);
|
1350 | return Object(result) === result ? result : child;
|
1351 | })(Minutes, [{}, this].concat(slice.call(args)), function(){});
|
1352 | };
|
1353 |
|
1354 | RDBVal.prototype.seconds = function() {
|
1355 | var args;
|
1356 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1357 | return (function(func, args, ctor) {
|
1358 | ctor.prototype = func.prototype;
|
1359 | var child = new ctor, result = func.apply(child, args);
|
1360 | return Object(result) === result ? result : child;
|
1361 | })(Seconds, [{}, this].concat(slice.call(args)), function(){});
|
1362 | };
|
1363 |
|
1364 | RDBVal.prototype.uuid = function() {
|
1365 | var args;
|
1366 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1367 | return (function(func, args, ctor) {
|
1368 | ctor.prototype = func.prototype;
|
1369 | var child = new ctor, result = func.apply(child, args);
|
1370 | return Object(result) === result ? result : child;
|
1371 | })(UUID, [{}, this].concat(slice.call(args)), function(){});
|
1372 | };
|
1373 |
|
1374 | RDBVal.prototype.getIntersecting = aropt(function(g, opts) {
|
1375 | return new GetIntersecting(opts, this, g);
|
1376 | });
|
1377 |
|
1378 | RDBVal.prototype.getNearest = aropt(function(g, opts) {
|
1379 | return new GetNearest(opts, this, g);
|
1380 | });
|
1381 |
|
1382 | return RDBVal;
|
1383 |
|
1384 | })(TermBase);
|
1385 |
|
1386 | DatumTerm = (function(superClass) {
|
1387 | extend(DatumTerm, superClass);
|
1388 |
|
1389 | DatumTerm.prototype.args = [];
|
1390 |
|
1391 | DatumTerm.prototype.optargs = {};
|
1392 |
|
1393 | function DatumTerm(val) {
|
1394 | var self;
|
1395 | self = DatumTerm.__super__.constructor.call(this);
|
1396 | self.data = val;
|
1397 | return self;
|
1398 | }
|
1399 |
|
1400 | DatumTerm.prototype.compose = function() {
|
1401 | switch (typeof this.data) {
|
1402 | case 'string':
|
1403 | return '"' + this.data + '"';
|
1404 | default:
|
1405 | return '' + this.data;
|
1406 | }
|
1407 | };
|
1408 |
|
1409 | DatumTerm.prototype.build = function() {
|
1410 | if (typeof this.data === 'number') {
|
1411 | if (!isFinite(this.data)) {
|
1412 | throw new TypeError("Illegal non-finite number `" + this.data.toString() + "`.");
|
1413 | }
|
1414 | }
|
1415 | return this.data;
|
1416 | };
|
1417 |
|
1418 | return DatumTerm;
|
1419 |
|
1420 | })(RDBVal);
|
1421 |
|
1422 | translateBackOptargs = function(optargs) {
|
1423 | var key, result, val;
|
1424 | result = {};
|
1425 | for (key in optargs) {
|
1426 | if (!hasProp.call(optargs, key)) continue;
|
1427 | val = optargs[key];
|
1428 | result[util.toCamelCase(key)] = val;
|
1429 | }
|
1430 | return result;
|
1431 | };
|
1432 |
|
1433 | translateOptargs = function(optargs) {
|
1434 | var key, result, val;
|
1435 | result = {};
|
1436 | for (key in optargs) {
|
1437 | if (!hasProp.call(optargs, key)) continue;
|
1438 | val = optargs[key];
|
1439 | if (key === void 0 || val === void 0) {
|
1440 | continue;
|
1441 | }
|
1442 | result[util.fromCamelCase(key)] = rethinkdb.expr(val);
|
1443 | }
|
1444 | return result;
|
1445 | };
|
1446 |
|
1447 | RDBOp = (function(superClass) {
|
1448 | extend(RDBOp, superClass);
|
1449 |
|
1450 | function RDBOp() {
|
1451 | var arg, args, i, optargs, self;
|
1452 | optargs = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
1453 | self = RDBOp.__super__.constructor.call(this);
|
1454 | self.args = (function() {
|
1455 | var j, len, results;
|
1456 | results = [];
|
1457 | for (i = j = 0, len = args.length; j < len; i = ++j) {
|
1458 | arg = args[i];
|
1459 | if (arg !== void 0) {
|
1460 | results.push(rethinkdb.expr(arg));
|
1461 | } else {
|
1462 | throw new err.ReqlDriverCompileError("Argument " + i + " to " + (this.st || this.mt) + " may not be `undefined`.");
|
1463 | }
|
1464 | }
|
1465 | return results;
|
1466 | }).call(this);
|
1467 | self.optargs = translateOptargs(optargs);
|
1468 | return self;
|
1469 | }
|
1470 |
|
1471 | RDBOp.prototype.build = function() {
|
1472 | var add_opts, arg, j, key, len, opts, ref, ref1, res, val;
|
1473 | res = [this.tt, []];
|
1474 | ref = this.args;
|
1475 | for (j = 0, len = ref.length; j < len; j++) {
|
1476 | arg = ref[j];
|
1477 | res[1].push(arg.build());
|
1478 | }
|
1479 | opts = {};
|
1480 | add_opts = false;
|
1481 | ref1 = this.optargs;
|
1482 | for (key in ref1) {
|
1483 | if (!hasProp.call(ref1, key)) continue;
|
1484 | val = ref1[key];
|
1485 | add_opts = true;
|
1486 | opts[key] = val.build();
|
1487 | }
|
1488 | if (add_opts) {
|
1489 | res.push(opts);
|
1490 | }
|
1491 | return res;
|
1492 | };
|
1493 |
|
1494 | RDBOp.prototype.compose = function(args, optargs) {
|
1495 | if (this.st) {
|
1496 | return ['r.', this.st, '(', intspallargs(args, optargs), ')'];
|
1497 | } else {
|
1498 | if (shouldWrap(this.args[0])) {
|
1499 | args[0] = ['r(', args[0], ')'];
|
1500 | }
|
1501 | return [args[0], '.', this.mt, '(', intspallargs(args.slice(1), optargs), ')'];
|
1502 | }
|
1503 | };
|
1504 |
|
1505 | return RDBOp;
|
1506 |
|
1507 | })(RDBVal);
|
1508 |
|
1509 | RDBConstant = (function(superClass) {
|
1510 | extend(RDBConstant, superClass);
|
1511 |
|
1512 | function RDBConstant() {
|
1513 | return RDBConstant.__super__.constructor.apply(this, arguments);
|
1514 | }
|
1515 |
|
1516 | RDBConstant.prototype.compose = function(args, optargs) {
|
1517 | return ['r.', this.st];
|
1518 | };
|
1519 |
|
1520 | return RDBConstant;
|
1521 |
|
1522 | })(RDBOp);
|
1523 |
|
1524 | intsp = function(seq) {
|
1525 | var e, j, len, ref, res;
|
1526 | if (seq[0] == null) {
|
1527 | return [];
|
1528 | }
|
1529 | res = [seq[0]];
|
1530 | ref = seq.slice(1);
|
1531 | for (j = 0, len = ref.length; j < len; j++) {
|
1532 | e = ref[j];
|
1533 | res.push(', ', e);
|
1534 | }
|
1535 | return res;
|
1536 | };
|
1537 |
|
1538 | kved = function(optargs) {
|
1539 | var k, v;
|
1540 | return [
|
1541 | '{', intsp((function() {
|
1542 | var results;
|
1543 | results = [];
|
1544 | for (k in optargs) {
|
1545 | if (!hasProp.call(optargs, k)) continue;
|
1546 | v = optargs[k];
|
1547 | results.push([JSON.stringify(k), ': ', v]);
|
1548 | }
|
1549 | return results;
|
1550 | })()), '}'
|
1551 | ];
|
1552 | };
|
1553 |
|
1554 | intspallargs = function(args, optargs) {
|
1555 | var argrepr;
|
1556 | argrepr = [];
|
1557 | if (args.length > 0) {
|
1558 | argrepr.push(intsp(args));
|
1559 | }
|
1560 | if (Object.keys(optargs).length > 0) {
|
1561 | if (argrepr.length > 0) {
|
1562 | argrepr.push(', ');
|
1563 | }
|
1564 | argrepr.push(kved(translateBackOptargs(optargs)));
|
1565 | }
|
1566 | return argrepr;
|
1567 | };
|
1568 |
|
1569 | shouldWrap = function(arg) {
|
1570 | return arg instanceof DatumTerm || arg instanceof MakeArray || arg instanceof MakeObject;
|
1571 | };
|
1572 |
|
1573 | MakeArray = (function(superClass) {
|
1574 | extend(MakeArray, superClass);
|
1575 |
|
1576 | function MakeArray() {
|
1577 | return MakeArray.__super__.constructor.apply(this, arguments);
|
1578 | }
|
1579 |
|
1580 | MakeArray.prototype.tt = protoTermType.MAKE_ARRAY;
|
1581 |
|
1582 | MakeArray.prototype.st = '[...]';
|
1583 |
|
1584 | MakeArray.prototype.compose = function(args) {
|
1585 | return ['[', intsp(args), ']'];
|
1586 | };
|
1587 |
|
1588 | return MakeArray;
|
1589 |
|
1590 | })(RDBOp);
|
1591 |
|
1592 | MakeObject = (function(superClass) {
|
1593 | extend(MakeObject, superClass);
|
1594 |
|
1595 | MakeObject.prototype.tt = protoTermType.MAKE_OBJ;
|
1596 |
|
1597 | MakeObject.prototype.st = '{...}';
|
1598 |
|
1599 | function MakeObject(obj, nestingDepth) {
|
1600 | var key, self, val;
|
1601 | if (nestingDepth == null) {
|
1602 | nestingDepth = 20;
|
1603 | }
|
1604 | self = MakeObject.__super__.constructor.call(this, {});
|
1605 | self.optargs = {};
|
1606 | for (key in obj) {
|
1607 | if (!hasProp.call(obj, key)) continue;
|
1608 | val = obj[key];
|
1609 | if (typeof val === 'undefined') {
|
1610 | throw new err.ReqlDriverCompileError("Object field '" + key + "' may not be undefined");
|
1611 | }
|
1612 | self.optargs[key] = rethinkdb.expr(val, nestingDepth - 1);
|
1613 | }
|
1614 | return self;
|
1615 | }
|
1616 |
|
1617 | MakeObject.prototype.compose = function(args, optargs) {
|
1618 | return kved(optargs);
|
1619 | };
|
1620 |
|
1621 | MakeObject.prototype.build = function() {
|
1622 | var key, ref, res, val;
|
1623 | res = {};
|
1624 | ref = this.optargs;
|
1625 | for (key in ref) {
|
1626 | if (!hasProp.call(ref, key)) continue;
|
1627 | val = ref[key];
|
1628 | res[key] = val.build();
|
1629 | }
|
1630 | return res;
|
1631 | };
|
1632 |
|
1633 | return MakeObject;
|
1634 |
|
1635 | })(RDBOp);
|
1636 |
|
1637 | Var = (function(superClass) {
|
1638 | extend(Var, superClass);
|
1639 |
|
1640 | function Var() {
|
1641 | return Var.__super__.constructor.apply(this, arguments);
|
1642 | }
|
1643 |
|
1644 | Var.prototype.tt = protoTermType.VAR;
|
1645 |
|
1646 | Var.prototype.compose = function(args) {
|
1647 | return ['var_' + args];
|
1648 | };
|
1649 |
|
1650 | return Var;
|
1651 |
|
1652 | })(RDBOp);
|
1653 |
|
1654 | JavaScript = (function(superClass) {
|
1655 | extend(JavaScript, superClass);
|
1656 |
|
1657 | function JavaScript() {
|
1658 | return JavaScript.__super__.constructor.apply(this, arguments);
|
1659 | }
|
1660 |
|
1661 | JavaScript.prototype.tt = protoTermType.JAVASCRIPT;
|
1662 |
|
1663 | JavaScript.prototype.st = 'js';
|
1664 |
|
1665 | return JavaScript;
|
1666 |
|
1667 | })(RDBOp);
|
1668 |
|
1669 | Http = (function(superClass) {
|
1670 | extend(Http, superClass);
|
1671 |
|
1672 | function Http() {
|
1673 | return Http.__super__.constructor.apply(this, arguments);
|
1674 | }
|
1675 |
|
1676 | Http.prototype.tt = protoTermType.HTTP;
|
1677 |
|
1678 | Http.prototype.st = 'http';
|
1679 |
|
1680 | return Http;
|
1681 |
|
1682 | })(RDBOp);
|
1683 |
|
1684 | Json = (function(superClass) {
|
1685 | extend(Json, superClass);
|
1686 |
|
1687 | function Json() {
|
1688 | return Json.__super__.constructor.apply(this, arguments);
|
1689 | }
|
1690 |
|
1691 | Json.prototype.tt = protoTermType.JSON;
|
1692 |
|
1693 | Json.prototype.st = 'json';
|
1694 |
|
1695 | return Json;
|
1696 |
|
1697 | })(RDBOp);
|
1698 |
|
1699 | Binary = (function(superClass) {
|
1700 | extend(Binary, superClass);
|
1701 |
|
1702 | Binary.prototype.tt = protoTermType.BINARY;
|
1703 |
|
1704 | Binary.prototype.st = 'binary';
|
1705 |
|
1706 | function Binary(data) {
|
1707 | var self;
|
1708 | if (data instanceof TermBase) {
|
1709 | self = Binary.__super__.constructor.call(this, {}, data);
|
1710 | } else if (data instanceof Buffer) {
|
1711 | self = Binary.__super__.constructor.call(this);
|
1712 | self.base64_data = data.toString("base64");
|
1713 | } else {
|
1714 | throw new TypeError("Parameter to `r.binary` must be a Buffer object or RQL query.");
|
1715 | }
|
1716 | return self;
|
1717 | }
|
1718 |
|
1719 | Binary.prototype.compose = function() {
|
1720 | if (this.args.length === 0) {
|
1721 | return 'r.binary(<data>)';
|
1722 | } else {
|
1723 | return Binary.__super__.compose.apply(this, arguments);
|
1724 | }
|
1725 | };
|
1726 |
|
1727 | Binary.prototype.build = function() {
|
1728 | if (this.args.length === 0) {
|
1729 | return {
|
1730 | '$reql_type$': 'BINARY',
|
1731 | 'data': this.base64_data
|
1732 | };
|
1733 | } else {
|
1734 | return Binary.__super__.build.apply(this, arguments);
|
1735 | }
|
1736 | };
|
1737 |
|
1738 | return Binary;
|
1739 |
|
1740 | })(RDBOp);
|
1741 |
|
1742 | Args = (function(superClass) {
|
1743 | extend(Args, superClass);
|
1744 |
|
1745 | function Args() {
|
1746 | return Args.__super__.constructor.apply(this, arguments);
|
1747 | }
|
1748 |
|
1749 | Args.prototype.tt = protoTermType.ARGS;
|
1750 |
|
1751 | Args.prototype.st = 'args';
|
1752 |
|
1753 | return Args;
|
1754 |
|
1755 | })(RDBOp);
|
1756 |
|
1757 | UserError = (function(superClass) {
|
1758 | extend(UserError, superClass);
|
1759 |
|
1760 | function UserError() {
|
1761 | return UserError.__super__.constructor.apply(this, arguments);
|
1762 | }
|
1763 |
|
1764 | UserError.prototype.tt = protoTermType.ERROR;
|
1765 |
|
1766 | UserError.prototype.st = 'error';
|
1767 |
|
1768 | return UserError;
|
1769 |
|
1770 | })(RDBOp);
|
1771 |
|
1772 | Random = (function(superClass) {
|
1773 | extend(Random, superClass);
|
1774 |
|
1775 | function Random() {
|
1776 | return Random.__super__.constructor.apply(this, arguments);
|
1777 | }
|
1778 |
|
1779 | Random.prototype.tt = protoTermType.RANDOM;
|
1780 |
|
1781 | Random.prototype.st = 'random';
|
1782 |
|
1783 | return Random;
|
1784 |
|
1785 | })(RDBOp);
|
1786 |
|
1787 | ImplicitVar = (function(superClass) {
|
1788 | extend(ImplicitVar, superClass);
|
1789 |
|
1790 | function ImplicitVar() {
|
1791 | return ImplicitVar.__super__.constructor.apply(this, arguments);
|
1792 | }
|
1793 |
|
1794 | ImplicitVar.prototype.tt = protoTermType.IMPLICIT_VAR;
|
1795 |
|
1796 | ImplicitVar.prototype.compose = function() {
|
1797 | return ['r.row'];
|
1798 | };
|
1799 |
|
1800 | return ImplicitVar;
|
1801 |
|
1802 | })(RDBOp);
|
1803 |
|
1804 | Db = (function(superClass) {
|
1805 | extend(Db, superClass);
|
1806 |
|
1807 | function Db() {
|
1808 | return Db.__super__.constructor.apply(this, arguments);
|
1809 | }
|
1810 |
|
1811 | Db.prototype.tt = protoTermType.DB;
|
1812 |
|
1813 | Db.prototype.st = 'db';
|
1814 |
|
1815 | return Db;
|
1816 |
|
1817 | })(RDBOp);
|
1818 |
|
1819 | Table = (function(superClass) {
|
1820 | extend(Table, superClass);
|
1821 |
|
1822 | function Table() {
|
1823 | return Table.__super__.constructor.apply(this, arguments);
|
1824 | }
|
1825 |
|
1826 | Table.prototype.tt = protoTermType.TABLE;
|
1827 |
|
1828 | Table.prototype.st = 'table';
|
1829 |
|
1830 | Table.prototype.compose = function(args, optargs) {
|
1831 | if (this.args[0] instanceof Db) {
|
1832 | return [args[0], '.table(', intspallargs(args.slice(1), optargs), ')'];
|
1833 | } else {
|
1834 | return ['r.table(', intspallargs(args, optargs), ')'];
|
1835 | }
|
1836 | };
|
1837 |
|
1838 | return Table;
|
1839 |
|
1840 | })(RDBOp);
|
1841 |
|
1842 | Get = (function(superClass) {
|
1843 | extend(Get, superClass);
|
1844 |
|
1845 | function Get() {
|
1846 | return Get.__super__.constructor.apply(this, arguments);
|
1847 | }
|
1848 |
|
1849 | Get.prototype.tt = protoTermType.GET;
|
1850 |
|
1851 | Get.prototype.mt = 'get';
|
1852 |
|
1853 | return Get;
|
1854 |
|
1855 | })(RDBOp);
|
1856 |
|
1857 | GetAll = (function(superClass) {
|
1858 | extend(GetAll, superClass);
|
1859 |
|
1860 | function GetAll() {
|
1861 | return GetAll.__super__.constructor.apply(this, arguments);
|
1862 | }
|
1863 |
|
1864 | GetAll.prototype.tt = protoTermType.GET_ALL;
|
1865 |
|
1866 | GetAll.prototype.mt = 'getAll';
|
1867 |
|
1868 | return GetAll;
|
1869 |
|
1870 | })(RDBOp);
|
1871 |
|
1872 | Eq = (function(superClass) {
|
1873 | extend(Eq, superClass);
|
1874 |
|
1875 | function Eq() {
|
1876 | return Eq.__super__.constructor.apply(this, arguments);
|
1877 | }
|
1878 |
|
1879 | Eq.prototype.tt = protoTermType.EQ;
|
1880 |
|
1881 | Eq.prototype.mt = 'eq';
|
1882 |
|
1883 | return Eq;
|
1884 |
|
1885 | })(RDBOp);
|
1886 |
|
1887 | Ne = (function(superClass) {
|
1888 | extend(Ne, superClass);
|
1889 |
|
1890 | function Ne() {
|
1891 | return Ne.__super__.constructor.apply(this, arguments);
|
1892 | }
|
1893 |
|
1894 | Ne.prototype.tt = protoTermType.NE;
|
1895 |
|
1896 | Ne.prototype.mt = 'ne';
|
1897 |
|
1898 | return Ne;
|
1899 |
|
1900 | })(RDBOp);
|
1901 |
|
1902 | Lt = (function(superClass) {
|
1903 | extend(Lt, superClass);
|
1904 |
|
1905 | function Lt() {
|
1906 | return Lt.__super__.constructor.apply(this, arguments);
|
1907 | }
|
1908 |
|
1909 | Lt.prototype.tt = protoTermType.LT;
|
1910 |
|
1911 | Lt.prototype.mt = 'lt';
|
1912 |
|
1913 | return Lt;
|
1914 |
|
1915 | })(RDBOp);
|
1916 |
|
1917 | Le = (function(superClass) {
|
1918 | extend(Le, superClass);
|
1919 |
|
1920 | function Le() {
|
1921 | return Le.__super__.constructor.apply(this, arguments);
|
1922 | }
|
1923 |
|
1924 | Le.prototype.tt = protoTermType.LE;
|
1925 |
|
1926 | Le.prototype.mt = 'le';
|
1927 |
|
1928 | return Le;
|
1929 |
|
1930 | })(RDBOp);
|
1931 |
|
1932 | Gt = (function(superClass) {
|
1933 | extend(Gt, superClass);
|
1934 |
|
1935 | function Gt() {
|
1936 | return Gt.__super__.constructor.apply(this, arguments);
|
1937 | }
|
1938 |
|
1939 | Gt.prototype.tt = protoTermType.GT;
|
1940 |
|
1941 | Gt.prototype.mt = 'gt';
|
1942 |
|
1943 | return Gt;
|
1944 |
|
1945 | })(RDBOp);
|
1946 |
|
1947 | Ge = (function(superClass) {
|
1948 | extend(Ge, superClass);
|
1949 |
|
1950 | function Ge() {
|
1951 | return Ge.__super__.constructor.apply(this, arguments);
|
1952 | }
|
1953 |
|
1954 | Ge.prototype.tt = protoTermType.GE;
|
1955 |
|
1956 | Ge.prototype.mt = 'ge';
|
1957 |
|
1958 | return Ge;
|
1959 |
|
1960 | })(RDBOp);
|
1961 |
|
1962 | Not = (function(superClass) {
|
1963 | extend(Not, superClass);
|
1964 |
|
1965 | function Not() {
|
1966 | return Not.__super__.constructor.apply(this, arguments);
|
1967 | }
|
1968 |
|
1969 | Not.prototype.tt = protoTermType.NOT;
|
1970 |
|
1971 | Not.prototype.mt = 'not';
|
1972 |
|
1973 | return Not;
|
1974 |
|
1975 | })(RDBOp);
|
1976 |
|
1977 | Add = (function(superClass) {
|
1978 | extend(Add, superClass);
|
1979 |
|
1980 | function Add() {
|
1981 | return Add.__super__.constructor.apply(this, arguments);
|
1982 | }
|
1983 |
|
1984 | Add.prototype.tt = protoTermType.ADD;
|
1985 |
|
1986 | Add.prototype.mt = 'add';
|
1987 |
|
1988 | return Add;
|
1989 |
|
1990 | })(RDBOp);
|
1991 |
|
1992 | Sub = (function(superClass) {
|
1993 | extend(Sub, superClass);
|
1994 |
|
1995 | function Sub() {
|
1996 | return Sub.__super__.constructor.apply(this, arguments);
|
1997 | }
|
1998 |
|
1999 | Sub.prototype.tt = protoTermType.SUB;
|
2000 |
|
2001 | Sub.prototype.mt = 'sub';
|
2002 |
|
2003 | return Sub;
|
2004 |
|
2005 | })(RDBOp);
|
2006 |
|
2007 | Mul = (function(superClass) {
|
2008 | extend(Mul, superClass);
|
2009 |
|
2010 | function Mul() {
|
2011 | return Mul.__super__.constructor.apply(this, arguments);
|
2012 | }
|
2013 |
|
2014 | Mul.prototype.tt = protoTermType.MUL;
|
2015 |
|
2016 | Mul.prototype.mt = 'mul';
|
2017 |
|
2018 | return Mul;
|
2019 |
|
2020 | })(RDBOp);
|
2021 |
|
2022 | Div = (function(superClass) {
|
2023 | extend(Div, superClass);
|
2024 |
|
2025 | function Div() {
|
2026 | return Div.__super__.constructor.apply(this, arguments);
|
2027 | }
|
2028 |
|
2029 | Div.prototype.tt = protoTermType.DIV;
|
2030 |
|
2031 | Div.prototype.mt = 'div';
|
2032 |
|
2033 | return Div;
|
2034 |
|
2035 | })(RDBOp);
|
2036 |
|
2037 | Mod = (function(superClass) {
|
2038 | extend(Mod, superClass);
|
2039 |
|
2040 | function Mod() {
|
2041 | return Mod.__super__.constructor.apply(this, arguments);
|
2042 | }
|
2043 |
|
2044 | Mod.prototype.tt = protoTermType.MOD;
|
2045 |
|
2046 | Mod.prototype.mt = 'mod';
|
2047 |
|
2048 | return Mod;
|
2049 |
|
2050 | })(RDBOp);
|
2051 |
|
2052 | Floor = (function(superClass) {
|
2053 | extend(Floor, superClass);
|
2054 |
|
2055 | function Floor() {
|
2056 | return Floor.__super__.constructor.apply(this, arguments);
|
2057 | }
|
2058 |
|
2059 | Floor.prototype.tt = protoTermType.FLOOR;
|
2060 |
|
2061 | Floor.prototype.mt = 'floor';
|
2062 |
|
2063 | return Floor;
|
2064 |
|
2065 | })(RDBOp);
|
2066 |
|
2067 | Ceil = (function(superClass) {
|
2068 | extend(Ceil, superClass);
|
2069 |
|
2070 | function Ceil() {
|
2071 | return Ceil.__super__.constructor.apply(this, arguments);
|
2072 | }
|
2073 |
|
2074 | Ceil.prototype.tt = protoTermType.CEIL;
|
2075 |
|
2076 | Ceil.prototype.mt = 'ceil';
|
2077 |
|
2078 | return Ceil;
|
2079 |
|
2080 | })(RDBOp);
|
2081 |
|
2082 | Round = (function(superClass) {
|
2083 | extend(Round, superClass);
|
2084 |
|
2085 | function Round() {
|
2086 | return Round.__super__.constructor.apply(this, arguments);
|
2087 | }
|
2088 |
|
2089 | Round.prototype.tt = protoTermType.ROUND;
|
2090 |
|
2091 | Round.prototype.mt = 'round';
|
2092 |
|
2093 | return Round;
|
2094 |
|
2095 | })(RDBOp);
|
2096 |
|
2097 | Append = (function(superClass) {
|
2098 | extend(Append, superClass);
|
2099 |
|
2100 | function Append() {
|
2101 | return Append.__super__.constructor.apply(this, arguments);
|
2102 | }
|
2103 |
|
2104 | Append.prototype.tt = protoTermType.APPEND;
|
2105 |
|
2106 | Append.prototype.mt = 'append';
|
2107 |
|
2108 | return Append;
|
2109 |
|
2110 | })(RDBOp);
|
2111 |
|
2112 | Prepend = (function(superClass) {
|
2113 | extend(Prepend, superClass);
|
2114 |
|
2115 | function Prepend() {
|
2116 | return Prepend.__super__.constructor.apply(this, arguments);
|
2117 | }
|
2118 |
|
2119 | Prepend.prototype.tt = protoTermType.PREPEND;
|
2120 |
|
2121 | Prepend.prototype.mt = 'prepend';
|
2122 |
|
2123 | return Prepend;
|
2124 |
|
2125 | })(RDBOp);
|
2126 |
|
2127 | Difference = (function(superClass) {
|
2128 | extend(Difference, superClass);
|
2129 |
|
2130 | function Difference() {
|
2131 | return Difference.__super__.constructor.apply(this, arguments);
|
2132 | }
|
2133 |
|
2134 | Difference.prototype.tt = protoTermType.DIFFERENCE;
|
2135 |
|
2136 | Difference.prototype.mt = 'difference';
|
2137 |
|
2138 | return Difference;
|
2139 |
|
2140 | })(RDBOp);
|
2141 |
|
2142 | SetInsert = (function(superClass) {
|
2143 | extend(SetInsert, superClass);
|
2144 |
|
2145 | function SetInsert() {
|
2146 | return SetInsert.__super__.constructor.apply(this, arguments);
|
2147 | }
|
2148 |
|
2149 | SetInsert.prototype.tt = protoTermType.SET_INSERT;
|
2150 |
|
2151 | SetInsert.prototype.mt = 'setInsert';
|
2152 |
|
2153 | return SetInsert;
|
2154 |
|
2155 | })(RDBOp);
|
2156 |
|
2157 | SetUnion = (function(superClass) {
|
2158 | extend(SetUnion, superClass);
|
2159 |
|
2160 | function SetUnion() {
|
2161 | return SetUnion.__super__.constructor.apply(this, arguments);
|
2162 | }
|
2163 |
|
2164 | SetUnion.prototype.tt = protoTermType.SET_UNION;
|
2165 |
|
2166 | SetUnion.prototype.mt = 'setUnion';
|
2167 |
|
2168 | return SetUnion;
|
2169 |
|
2170 | })(RDBOp);
|
2171 |
|
2172 | SetIntersection = (function(superClass) {
|
2173 | extend(SetIntersection, superClass);
|
2174 |
|
2175 | function SetIntersection() {
|
2176 | return SetIntersection.__super__.constructor.apply(this, arguments);
|
2177 | }
|
2178 |
|
2179 | SetIntersection.prototype.tt = protoTermType.SET_INTERSECTION;
|
2180 |
|
2181 | SetIntersection.prototype.mt = 'setIntersection';
|
2182 |
|
2183 | return SetIntersection;
|
2184 |
|
2185 | })(RDBOp);
|
2186 |
|
2187 | SetDifference = (function(superClass) {
|
2188 | extend(SetDifference, superClass);
|
2189 |
|
2190 | function SetDifference() {
|
2191 | return SetDifference.__super__.constructor.apply(this, arguments);
|
2192 | }
|
2193 |
|
2194 | SetDifference.prototype.tt = protoTermType.SET_DIFFERENCE;
|
2195 |
|
2196 | SetDifference.prototype.mt = 'setDifference';
|
2197 |
|
2198 | return SetDifference;
|
2199 |
|
2200 | })(RDBOp);
|
2201 |
|
2202 | Slice = (function(superClass) {
|
2203 | extend(Slice, superClass);
|
2204 |
|
2205 | function Slice() {
|
2206 | return Slice.__super__.constructor.apply(this, arguments);
|
2207 | }
|
2208 |
|
2209 | Slice.prototype.tt = protoTermType.SLICE;
|
2210 |
|
2211 | Slice.prototype.mt = 'slice';
|
2212 |
|
2213 | return Slice;
|
2214 |
|
2215 | })(RDBOp);
|
2216 |
|
2217 | Skip = (function(superClass) {
|
2218 | extend(Skip, superClass);
|
2219 |
|
2220 | function Skip() {
|
2221 | return Skip.__super__.constructor.apply(this, arguments);
|
2222 | }
|
2223 |
|
2224 | Skip.prototype.tt = protoTermType.SKIP;
|
2225 |
|
2226 | Skip.prototype.mt = 'skip';
|
2227 |
|
2228 | return Skip;
|
2229 |
|
2230 | })(RDBOp);
|
2231 |
|
2232 | Limit = (function(superClass) {
|
2233 | extend(Limit, superClass);
|
2234 |
|
2235 | function Limit() {
|
2236 | return Limit.__super__.constructor.apply(this, arguments);
|
2237 | }
|
2238 |
|
2239 | Limit.prototype.tt = protoTermType.LIMIT;
|
2240 |
|
2241 | Limit.prototype.mt = 'limit';
|
2242 |
|
2243 | return Limit;
|
2244 |
|
2245 | })(RDBOp);
|
2246 |
|
2247 | GetField = (function(superClass) {
|
2248 | extend(GetField, superClass);
|
2249 |
|
2250 | function GetField() {
|
2251 | return GetField.__super__.constructor.apply(this, arguments);
|
2252 | }
|
2253 |
|
2254 | GetField.prototype.tt = protoTermType.GET_FIELD;
|
2255 |
|
2256 | GetField.prototype.mt = 'getField';
|
2257 |
|
2258 | return GetField;
|
2259 |
|
2260 | })(RDBOp);
|
2261 |
|
2262 | Bracket = (function(superClass) {
|
2263 | extend(Bracket, superClass);
|
2264 |
|
2265 | function Bracket() {
|
2266 | return Bracket.__super__.constructor.apply(this, arguments);
|
2267 | }
|
2268 |
|
2269 | Bracket.prototype.tt = protoTermType.BRACKET;
|
2270 |
|
2271 | Bracket.prototype.st = '(...)';
|
2272 |
|
2273 | Bracket.prototype.compose = function(args) {
|
2274 | return [args[0], '(', args[1], ')'];
|
2275 | };
|
2276 |
|
2277 | return Bracket;
|
2278 |
|
2279 | })(RDBOp);
|
2280 |
|
2281 | Contains = (function(superClass) {
|
2282 | extend(Contains, superClass);
|
2283 |
|
2284 | function Contains() {
|
2285 | return Contains.__super__.constructor.apply(this, arguments);
|
2286 | }
|
2287 |
|
2288 | Contains.prototype.tt = protoTermType.CONTAINS;
|
2289 |
|
2290 | Contains.prototype.mt = 'contains';
|
2291 |
|
2292 | return Contains;
|
2293 |
|
2294 | })(RDBOp);
|
2295 |
|
2296 | InsertAt = (function(superClass) {
|
2297 | extend(InsertAt, superClass);
|
2298 |
|
2299 | function InsertAt() {
|
2300 | return InsertAt.__super__.constructor.apply(this, arguments);
|
2301 | }
|
2302 |
|
2303 | InsertAt.prototype.tt = protoTermType.INSERT_AT;
|
2304 |
|
2305 | InsertAt.prototype.mt = 'insertAt';
|
2306 |
|
2307 | return InsertAt;
|
2308 |
|
2309 | })(RDBOp);
|
2310 |
|
2311 | SpliceAt = (function(superClass) {
|
2312 | extend(SpliceAt, superClass);
|
2313 |
|
2314 | function SpliceAt() {
|
2315 | return SpliceAt.__super__.constructor.apply(this, arguments);
|
2316 | }
|
2317 |
|
2318 | SpliceAt.prototype.tt = protoTermType.SPLICE_AT;
|
2319 |
|
2320 | SpliceAt.prototype.mt = 'spliceAt';
|
2321 |
|
2322 | return SpliceAt;
|
2323 |
|
2324 | })(RDBOp);
|
2325 |
|
2326 | DeleteAt = (function(superClass) {
|
2327 | extend(DeleteAt, superClass);
|
2328 |
|
2329 | function DeleteAt() {
|
2330 | return DeleteAt.__super__.constructor.apply(this, arguments);
|
2331 | }
|
2332 |
|
2333 | DeleteAt.prototype.tt = protoTermType.DELETE_AT;
|
2334 |
|
2335 | DeleteAt.prototype.mt = 'deleteAt';
|
2336 |
|
2337 | return DeleteAt;
|
2338 |
|
2339 | })(RDBOp);
|
2340 |
|
2341 | ChangeAt = (function(superClass) {
|
2342 | extend(ChangeAt, superClass);
|
2343 |
|
2344 | function ChangeAt() {
|
2345 | return ChangeAt.__super__.constructor.apply(this, arguments);
|
2346 | }
|
2347 |
|
2348 | ChangeAt.prototype.tt = protoTermType.CHANGE_AT;
|
2349 |
|
2350 | ChangeAt.prototype.mt = 'changeAt';
|
2351 |
|
2352 | return ChangeAt;
|
2353 |
|
2354 | })(RDBOp);
|
2355 |
|
2356 | HasFields = (function(superClass) {
|
2357 | extend(HasFields, superClass);
|
2358 |
|
2359 | function HasFields() {
|
2360 | return HasFields.__super__.constructor.apply(this, arguments);
|
2361 | }
|
2362 |
|
2363 | HasFields.prototype.tt = protoTermType.HAS_FIELDS;
|
2364 |
|
2365 | HasFields.prototype.mt = 'hasFields';
|
2366 |
|
2367 | return HasFields;
|
2368 |
|
2369 | })(RDBOp);
|
2370 |
|
2371 | WithFields = (function(superClass) {
|
2372 | extend(WithFields, superClass);
|
2373 |
|
2374 | function WithFields() {
|
2375 | return WithFields.__super__.constructor.apply(this, arguments);
|
2376 | }
|
2377 |
|
2378 | WithFields.prototype.tt = protoTermType.WITH_FIELDS;
|
2379 |
|
2380 | WithFields.prototype.mt = 'withFields';
|
2381 |
|
2382 | return WithFields;
|
2383 |
|
2384 | })(RDBOp);
|
2385 |
|
2386 | Keys = (function(superClass) {
|
2387 | extend(Keys, superClass);
|
2388 |
|
2389 | function Keys() {
|
2390 | return Keys.__super__.constructor.apply(this, arguments);
|
2391 | }
|
2392 |
|
2393 | Keys.prototype.tt = protoTermType.KEYS;
|
2394 |
|
2395 | Keys.prototype.mt = 'keys';
|
2396 |
|
2397 | return Keys;
|
2398 |
|
2399 | })(RDBOp);
|
2400 |
|
2401 | Values = (function(superClass) {
|
2402 | extend(Values, superClass);
|
2403 |
|
2404 | function Values() {
|
2405 | return Values.__super__.constructor.apply(this, arguments);
|
2406 | }
|
2407 |
|
2408 | Values.prototype.tt = protoTermType.VALUES;
|
2409 |
|
2410 | Values.prototype.mt = 'values';
|
2411 |
|
2412 | return Values;
|
2413 |
|
2414 | })(RDBOp);
|
2415 |
|
2416 | Changes = (function(superClass) {
|
2417 | extend(Changes, superClass);
|
2418 |
|
2419 | function Changes() {
|
2420 | return Changes.__super__.constructor.apply(this, arguments);
|
2421 | }
|
2422 |
|
2423 | Changes.prototype.tt = protoTermType.CHANGES;
|
2424 |
|
2425 | Changes.prototype.mt = 'changes';
|
2426 |
|
2427 | return Changes;
|
2428 |
|
2429 | })(RDBOp);
|
2430 |
|
2431 | Object_ = (function(superClass) {
|
2432 | extend(Object_, superClass);
|
2433 |
|
2434 | function Object_() {
|
2435 | return Object_.__super__.constructor.apply(this, arguments);
|
2436 | }
|
2437 |
|
2438 | Object_.prototype.tt = protoTermType.OBJECT;
|
2439 |
|
2440 | Object_.prototype.mt = 'object';
|
2441 |
|
2442 | return Object_;
|
2443 |
|
2444 | })(RDBOp);
|
2445 |
|
2446 | Pluck = (function(superClass) {
|
2447 | extend(Pluck, superClass);
|
2448 |
|
2449 | function Pluck() {
|
2450 | return Pluck.__super__.constructor.apply(this, arguments);
|
2451 | }
|
2452 |
|
2453 | Pluck.prototype.tt = protoTermType.PLUCK;
|
2454 |
|
2455 | Pluck.prototype.mt = 'pluck';
|
2456 |
|
2457 | return Pluck;
|
2458 |
|
2459 | })(RDBOp);
|
2460 |
|
2461 | OffsetsOf = (function(superClass) {
|
2462 | extend(OffsetsOf, superClass);
|
2463 |
|
2464 | function OffsetsOf() {
|
2465 | return OffsetsOf.__super__.constructor.apply(this, arguments);
|
2466 | }
|
2467 |
|
2468 | OffsetsOf.prototype.tt = protoTermType.OFFSETS_OF;
|
2469 |
|
2470 | OffsetsOf.prototype.mt = 'offsetsOf';
|
2471 |
|
2472 | return OffsetsOf;
|
2473 |
|
2474 | })(RDBOp);
|
2475 |
|
2476 | Without = (function(superClass) {
|
2477 | extend(Without, superClass);
|
2478 |
|
2479 | function Without() {
|
2480 | return Without.__super__.constructor.apply(this, arguments);
|
2481 | }
|
2482 |
|
2483 | Without.prototype.tt = protoTermType.WITHOUT;
|
2484 |
|
2485 | Without.prototype.mt = 'without';
|
2486 |
|
2487 | return Without;
|
2488 |
|
2489 | })(RDBOp);
|
2490 |
|
2491 | Merge = (function(superClass) {
|
2492 | extend(Merge, superClass);
|
2493 |
|
2494 | function Merge() {
|
2495 | return Merge.__super__.constructor.apply(this, arguments);
|
2496 | }
|
2497 |
|
2498 | Merge.prototype.tt = protoTermType.MERGE;
|
2499 |
|
2500 | Merge.prototype.mt = 'merge';
|
2501 |
|
2502 | return Merge;
|
2503 |
|
2504 | })(RDBOp);
|
2505 |
|
2506 | Between = (function(superClass) {
|
2507 | extend(Between, superClass);
|
2508 |
|
2509 | function Between() {
|
2510 | return Between.__super__.constructor.apply(this, arguments);
|
2511 | }
|
2512 |
|
2513 | Between.prototype.tt = protoTermType.BETWEEN;
|
2514 |
|
2515 | Between.prototype.mt = 'between';
|
2516 |
|
2517 | return Between;
|
2518 |
|
2519 | })(RDBOp);
|
2520 |
|
2521 | Reduce = (function(superClass) {
|
2522 | extend(Reduce, superClass);
|
2523 |
|
2524 | function Reduce() {
|
2525 | return Reduce.__super__.constructor.apply(this, arguments);
|
2526 | }
|
2527 |
|
2528 | Reduce.prototype.tt = protoTermType.REDUCE;
|
2529 |
|
2530 | Reduce.prototype.mt = 'reduce';
|
2531 |
|
2532 | return Reduce;
|
2533 |
|
2534 | })(RDBOp);
|
2535 |
|
2536 | Map = (function(superClass) {
|
2537 | extend(Map, superClass);
|
2538 |
|
2539 | function Map() {
|
2540 | return Map.__super__.constructor.apply(this, arguments);
|
2541 | }
|
2542 |
|
2543 | Map.prototype.tt = protoTermType.MAP;
|
2544 |
|
2545 | Map.prototype.mt = 'map';
|
2546 |
|
2547 | return Map;
|
2548 |
|
2549 | })(RDBOp);
|
2550 |
|
2551 | Fold = (function(superClass) {
|
2552 | extend(Fold, superClass);
|
2553 |
|
2554 | function Fold() {
|
2555 | return Fold.__super__.constructor.apply(this, arguments);
|
2556 | }
|
2557 |
|
2558 | Fold.prototype.tt = protoTermType.FOLD;
|
2559 |
|
2560 | Fold.prototype.mt = 'fold';
|
2561 |
|
2562 | return Fold;
|
2563 |
|
2564 | })(RDBOp);
|
2565 |
|
2566 | Filter = (function(superClass) {
|
2567 | extend(Filter, superClass);
|
2568 |
|
2569 | function Filter() {
|
2570 | return Filter.__super__.constructor.apply(this, arguments);
|
2571 | }
|
2572 |
|
2573 | Filter.prototype.tt = protoTermType.FILTER;
|
2574 |
|
2575 | Filter.prototype.mt = 'filter';
|
2576 |
|
2577 | return Filter;
|
2578 |
|
2579 | })(RDBOp);
|
2580 |
|
2581 | ConcatMap = (function(superClass) {
|
2582 | extend(ConcatMap, superClass);
|
2583 |
|
2584 | function ConcatMap() {
|
2585 | return ConcatMap.__super__.constructor.apply(this, arguments);
|
2586 | }
|
2587 |
|
2588 | ConcatMap.prototype.tt = protoTermType.CONCAT_MAP;
|
2589 |
|
2590 | ConcatMap.prototype.mt = 'concatMap';
|
2591 |
|
2592 | return ConcatMap;
|
2593 |
|
2594 | })(RDBOp);
|
2595 |
|
2596 | OrderBy = (function(superClass) {
|
2597 | extend(OrderBy, superClass);
|
2598 |
|
2599 | function OrderBy() {
|
2600 | return OrderBy.__super__.constructor.apply(this, arguments);
|
2601 | }
|
2602 |
|
2603 | OrderBy.prototype.tt = protoTermType.ORDER_BY;
|
2604 |
|
2605 | OrderBy.prototype.mt = 'orderBy';
|
2606 |
|
2607 | return OrderBy;
|
2608 |
|
2609 | })(RDBOp);
|
2610 |
|
2611 | Distinct = (function(superClass) {
|
2612 | extend(Distinct, superClass);
|
2613 |
|
2614 | function Distinct() {
|
2615 | return Distinct.__super__.constructor.apply(this, arguments);
|
2616 | }
|
2617 |
|
2618 | Distinct.prototype.tt = protoTermType.DISTINCT;
|
2619 |
|
2620 | Distinct.prototype.mt = 'distinct';
|
2621 |
|
2622 | return Distinct;
|
2623 |
|
2624 | })(RDBOp);
|
2625 |
|
2626 | Count = (function(superClass) {
|
2627 | extend(Count, superClass);
|
2628 |
|
2629 | function Count() {
|
2630 | return Count.__super__.constructor.apply(this, arguments);
|
2631 | }
|
2632 |
|
2633 | Count.prototype.tt = protoTermType.COUNT;
|
2634 |
|
2635 | Count.prototype.mt = 'count';
|
2636 |
|
2637 | return Count;
|
2638 |
|
2639 | })(RDBOp);
|
2640 |
|
2641 | Union = (function(superClass) {
|
2642 | extend(Union, superClass);
|
2643 |
|
2644 | function Union() {
|
2645 | return Union.__super__.constructor.apply(this, arguments);
|
2646 | }
|
2647 |
|
2648 | Union.prototype.tt = protoTermType.UNION;
|
2649 |
|
2650 | Union.prototype.mt = 'union';
|
2651 |
|
2652 | return Union;
|
2653 |
|
2654 | })(RDBOp);
|
2655 |
|
2656 | Nth = (function(superClass) {
|
2657 | extend(Nth, superClass);
|
2658 |
|
2659 | function Nth() {
|
2660 | return Nth.__super__.constructor.apply(this, arguments);
|
2661 | }
|
2662 |
|
2663 | Nth.prototype.tt = protoTermType.NTH;
|
2664 |
|
2665 | Nth.prototype.mt = 'nth';
|
2666 |
|
2667 | return Nth;
|
2668 |
|
2669 | })(RDBOp);
|
2670 |
|
2671 | ToJsonString = (function(superClass) {
|
2672 | extend(ToJsonString, superClass);
|
2673 |
|
2674 | function ToJsonString() {
|
2675 | return ToJsonString.__super__.constructor.apply(this, arguments);
|
2676 | }
|
2677 |
|
2678 | ToJsonString.prototype.tt = protoTermType.TO_JSON_STRING;
|
2679 |
|
2680 | ToJsonString.prototype.mt = 'toJsonString';
|
2681 |
|
2682 | return ToJsonString;
|
2683 |
|
2684 | })(RDBOp);
|
2685 |
|
2686 | Match = (function(superClass) {
|
2687 | extend(Match, superClass);
|
2688 |
|
2689 | function Match() {
|
2690 | return Match.__super__.constructor.apply(this, arguments);
|
2691 | }
|
2692 |
|
2693 | Match.prototype.tt = protoTermType.MATCH;
|
2694 |
|
2695 | Match.prototype.mt = 'match';
|
2696 |
|
2697 | return Match;
|
2698 |
|
2699 | })(RDBOp);
|
2700 |
|
2701 | Split = (function(superClass) {
|
2702 | extend(Split, superClass);
|
2703 |
|
2704 | function Split() {
|
2705 | return Split.__super__.constructor.apply(this, arguments);
|
2706 | }
|
2707 |
|
2708 | Split.prototype.tt = protoTermType.SPLIT;
|
2709 |
|
2710 | Split.prototype.mt = 'split';
|
2711 |
|
2712 | return Split;
|
2713 |
|
2714 | })(RDBOp);
|
2715 |
|
2716 | Upcase = (function(superClass) {
|
2717 | extend(Upcase, superClass);
|
2718 |
|
2719 | function Upcase() {
|
2720 | return Upcase.__super__.constructor.apply(this, arguments);
|
2721 | }
|
2722 |
|
2723 | Upcase.prototype.tt = protoTermType.UPCASE;
|
2724 |
|
2725 | Upcase.prototype.mt = 'upcase';
|
2726 |
|
2727 | return Upcase;
|
2728 |
|
2729 | })(RDBOp);
|
2730 |
|
2731 | Downcase = (function(superClass) {
|
2732 | extend(Downcase, superClass);
|
2733 |
|
2734 | function Downcase() {
|
2735 | return Downcase.__super__.constructor.apply(this, arguments);
|
2736 | }
|
2737 |
|
2738 | Downcase.prototype.tt = protoTermType.DOWNCASE;
|
2739 |
|
2740 | Downcase.prototype.mt = 'downcase';
|
2741 |
|
2742 | return Downcase;
|
2743 |
|
2744 | })(RDBOp);
|
2745 |
|
2746 | IsEmpty = (function(superClass) {
|
2747 | extend(IsEmpty, superClass);
|
2748 |
|
2749 | function IsEmpty() {
|
2750 | return IsEmpty.__super__.constructor.apply(this, arguments);
|
2751 | }
|
2752 |
|
2753 | IsEmpty.prototype.tt = protoTermType.IS_EMPTY;
|
2754 |
|
2755 | IsEmpty.prototype.mt = 'isEmpty';
|
2756 |
|
2757 | return IsEmpty;
|
2758 |
|
2759 | })(RDBOp);
|
2760 |
|
2761 | Group = (function(superClass) {
|
2762 | extend(Group, superClass);
|
2763 |
|
2764 | function Group() {
|
2765 | return Group.__super__.constructor.apply(this, arguments);
|
2766 | }
|
2767 |
|
2768 | Group.prototype.tt = protoTermType.GROUP;
|
2769 |
|
2770 | Group.prototype.mt = 'group';
|
2771 |
|
2772 | return Group;
|
2773 |
|
2774 | })(RDBOp);
|
2775 |
|
2776 | Sum = (function(superClass) {
|
2777 | extend(Sum, superClass);
|
2778 |
|
2779 | function Sum() {
|
2780 | return Sum.__super__.constructor.apply(this, arguments);
|
2781 | }
|
2782 |
|
2783 | Sum.prototype.tt = protoTermType.SUM;
|
2784 |
|
2785 | Sum.prototype.mt = 'sum';
|
2786 |
|
2787 | return Sum;
|
2788 |
|
2789 | })(RDBOp);
|
2790 |
|
2791 | Avg = (function(superClass) {
|
2792 | extend(Avg, superClass);
|
2793 |
|
2794 | function Avg() {
|
2795 | return Avg.__super__.constructor.apply(this, arguments);
|
2796 | }
|
2797 |
|
2798 | Avg.prototype.tt = protoTermType.AVG;
|
2799 |
|
2800 | Avg.prototype.mt = 'avg';
|
2801 |
|
2802 | return Avg;
|
2803 |
|
2804 | })(RDBOp);
|
2805 |
|
2806 | Min = (function(superClass) {
|
2807 | extend(Min, superClass);
|
2808 |
|
2809 | function Min() {
|
2810 | return Min.__super__.constructor.apply(this, arguments);
|
2811 | }
|
2812 |
|
2813 | Min.prototype.tt = protoTermType.MIN;
|
2814 |
|
2815 | Min.prototype.mt = 'min';
|
2816 |
|
2817 | return Min;
|
2818 |
|
2819 | })(RDBOp);
|
2820 |
|
2821 | Max = (function(superClass) {
|
2822 | extend(Max, superClass);
|
2823 |
|
2824 | function Max() {
|
2825 | return Max.__super__.constructor.apply(this, arguments);
|
2826 | }
|
2827 |
|
2828 | Max.prototype.tt = protoTermType.MAX;
|
2829 |
|
2830 | Max.prototype.mt = 'max';
|
2831 |
|
2832 | return Max;
|
2833 |
|
2834 | })(RDBOp);
|
2835 |
|
2836 | InnerJoin = (function(superClass) {
|
2837 | extend(InnerJoin, superClass);
|
2838 |
|
2839 | function InnerJoin() {
|
2840 | return InnerJoin.__super__.constructor.apply(this, arguments);
|
2841 | }
|
2842 |
|
2843 | InnerJoin.prototype.tt = protoTermType.INNER_JOIN;
|
2844 |
|
2845 | InnerJoin.prototype.mt = 'innerJoin';
|
2846 |
|
2847 | return InnerJoin;
|
2848 |
|
2849 | })(RDBOp);
|
2850 |
|
2851 | OuterJoin = (function(superClass) {
|
2852 | extend(OuterJoin, superClass);
|
2853 |
|
2854 | function OuterJoin() {
|
2855 | return OuterJoin.__super__.constructor.apply(this, arguments);
|
2856 | }
|
2857 |
|
2858 | OuterJoin.prototype.tt = protoTermType.OUTER_JOIN;
|
2859 |
|
2860 | OuterJoin.prototype.mt = 'outerJoin';
|
2861 |
|
2862 | return OuterJoin;
|
2863 |
|
2864 | })(RDBOp);
|
2865 |
|
2866 | EqJoin = (function(superClass) {
|
2867 | extend(EqJoin, superClass);
|
2868 |
|
2869 | function EqJoin() {
|
2870 | return EqJoin.__super__.constructor.apply(this, arguments);
|
2871 | }
|
2872 |
|
2873 | EqJoin.prototype.tt = protoTermType.EQ_JOIN;
|
2874 |
|
2875 | EqJoin.prototype.mt = 'eqJoin';
|
2876 |
|
2877 | return EqJoin;
|
2878 |
|
2879 | })(RDBOp);
|
2880 |
|
2881 | Zip = (function(superClass) {
|
2882 | extend(Zip, superClass);
|
2883 |
|
2884 | function Zip() {
|
2885 | return Zip.__super__.constructor.apply(this, arguments);
|
2886 | }
|
2887 |
|
2888 | Zip.prototype.tt = protoTermType.ZIP;
|
2889 |
|
2890 | Zip.prototype.mt = 'zip';
|
2891 |
|
2892 | return Zip;
|
2893 |
|
2894 | })(RDBOp);
|
2895 |
|
2896 | Range = (function(superClass) {
|
2897 | extend(Range, superClass);
|
2898 |
|
2899 | function Range() {
|
2900 | return Range.__super__.constructor.apply(this, arguments);
|
2901 | }
|
2902 |
|
2903 | Range.prototype.tt = protoTermType.RANGE;
|
2904 |
|
2905 | Range.prototype.st = 'range';
|
2906 |
|
2907 | return Range;
|
2908 |
|
2909 | })(RDBOp);
|
2910 |
|
2911 | CoerceTo = (function(superClass) {
|
2912 | extend(CoerceTo, superClass);
|
2913 |
|
2914 | function CoerceTo() {
|
2915 | return CoerceTo.__super__.constructor.apply(this, arguments);
|
2916 | }
|
2917 |
|
2918 | CoerceTo.prototype.tt = protoTermType.COERCE_TO;
|
2919 |
|
2920 | CoerceTo.prototype.mt = 'coerceTo';
|
2921 |
|
2922 | return CoerceTo;
|
2923 |
|
2924 | })(RDBOp);
|
2925 |
|
2926 | Ungroup = (function(superClass) {
|
2927 | extend(Ungroup, superClass);
|
2928 |
|
2929 | function Ungroup() {
|
2930 | return Ungroup.__super__.constructor.apply(this, arguments);
|
2931 | }
|
2932 |
|
2933 | Ungroup.prototype.tt = protoTermType.UNGROUP;
|
2934 |
|
2935 | Ungroup.prototype.mt = 'ungroup';
|
2936 |
|
2937 | return Ungroup;
|
2938 |
|
2939 | })(RDBOp);
|
2940 |
|
2941 | TypeOf = (function(superClass) {
|
2942 | extend(TypeOf, superClass);
|
2943 |
|
2944 | function TypeOf() {
|
2945 | return TypeOf.__super__.constructor.apply(this, arguments);
|
2946 | }
|
2947 |
|
2948 | TypeOf.prototype.tt = protoTermType.TYPE_OF;
|
2949 |
|
2950 | TypeOf.prototype.mt = 'typeOf';
|
2951 |
|
2952 | return TypeOf;
|
2953 |
|
2954 | })(RDBOp);
|
2955 |
|
2956 | Info = (function(superClass) {
|
2957 | extend(Info, superClass);
|
2958 |
|
2959 | function Info() {
|
2960 | return Info.__super__.constructor.apply(this, arguments);
|
2961 | }
|
2962 |
|
2963 | Info.prototype.tt = protoTermType.INFO;
|
2964 |
|
2965 | Info.prototype.mt = 'info';
|
2966 |
|
2967 | return Info;
|
2968 |
|
2969 | })(RDBOp);
|
2970 |
|
2971 | Sample = (function(superClass) {
|
2972 | extend(Sample, superClass);
|
2973 |
|
2974 | function Sample() {
|
2975 | return Sample.__super__.constructor.apply(this, arguments);
|
2976 | }
|
2977 |
|
2978 | Sample.prototype.tt = protoTermType.SAMPLE;
|
2979 |
|
2980 | Sample.prototype.mt = 'sample';
|
2981 |
|
2982 | return Sample;
|
2983 |
|
2984 | })(RDBOp);
|
2985 |
|
2986 | Update = (function(superClass) {
|
2987 | extend(Update, superClass);
|
2988 |
|
2989 | function Update() {
|
2990 | return Update.__super__.constructor.apply(this, arguments);
|
2991 | }
|
2992 |
|
2993 | Update.prototype.tt = protoTermType.UPDATE;
|
2994 |
|
2995 | Update.prototype.mt = 'update';
|
2996 |
|
2997 | return Update;
|
2998 |
|
2999 | })(RDBOp);
|
3000 |
|
3001 | Delete = (function(superClass) {
|
3002 | extend(Delete, superClass);
|
3003 |
|
3004 | function Delete() {
|
3005 | return Delete.__super__.constructor.apply(this, arguments);
|
3006 | }
|
3007 |
|
3008 | Delete.prototype.tt = protoTermType.DELETE;
|
3009 |
|
3010 | Delete.prototype.mt = 'delete';
|
3011 |
|
3012 | return Delete;
|
3013 |
|
3014 | })(RDBOp);
|
3015 |
|
3016 | Replace = (function(superClass) {
|
3017 | extend(Replace, superClass);
|
3018 |
|
3019 | function Replace() {
|
3020 | return Replace.__super__.constructor.apply(this, arguments);
|
3021 | }
|
3022 |
|
3023 | Replace.prototype.tt = protoTermType.REPLACE;
|
3024 |
|
3025 | Replace.prototype.mt = 'replace';
|
3026 |
|
3027 | return Replace;
|
3028 |
|
3029 | })(RDBOp);
|
3030 |
|
3031 | Insert = (function(superClass) {
|
3032 | extend(Insert, superClass);
|
3033 |
|
3034 | function Insert() {
|
3035 | return Insert.__super__.constructor.apply(this, arguments);
|
3036 | }
|
3037 |
|
3038 | Insert.prototype.tt = protoTermType.INSERT;
|
3039 |
|
3040 | Insert.prototype.mt = 'insert';
|
3041 |
|
3042 | return Insert;
|
3043 |
|
3044 | })(RDBOp);
|
3045 |
|
3046 | DbCreate = (function(superClass) {
|
3047 | extend(DbCreate, superClass);
|
3048 |
|
3049 | function DbCreate() {
|
3050 | return DbCreate.__super__.constructor.apply(this, arguments);
|
3051 | }
|
3052 |
|
3053 | DbCreate.prototype.tt = protoTermType.DB_CREATE;
|
3054 |
|
3055 | DbCreate.prototype.st = 'dbCreate';
|
3056 |
|
3057 | return DbCreate;
|
3058 |
|
3059 | })(RDBOp);
|
3060 |
|
3061 | DbDrop = (function(superClass) {
|
3062 | extend(DbDrop, superClass);
|
3063 |
|
3064 | function DbDrop() {
|
3065 | return DbDrop.__super__.constructor.apply(this, arguments);
|
3066 | }
|
3067 |
|
3068 | DbDrop.prototype.tt = protoTermType.DB_DROP;
|
3069 |
|
3070 | DbDrop.prototype.st = 'dbDrop';
|
3071 |
|
3072 | return DbDrop;
|
3073 |
|
3074 | })(RDBOp);
|
3075 |
|
3076 | DbList = (function(superClass) {
|
3077 | extend(DbList, superClass);
|
3078 |
|
3079 | function DbList() {
|
3080 | return DbList.__super__.constructor.apply(this, arguments);
|
3081 | }
|
3082 |
|
3083 | DbList.prototype.tt = protoTermType.DB_LIST;
|
3084 |
|
3085 | DbList.prototype.st = 'dbList';
|
3086 |
|
3087 | return DbList;
|
3088 |
|
3089 | })(RDBOp);
|
3090 |
|
3091 | TableCreate = (function(superClass) {
|
3092 | extend(TableCreate, superClass);
|
3093 |
|
3094 | function TableCreate() {
|
3095 | return TableCreate.__super__.constructor.apply(this, arguments);
|
3096 | }
|
3097 |
|
3098 | TableCreate.prototype.tt = protoTermType.TABLE_CREATE;
|
3099 |
|
3100 | TableCreate.prototype.mt = 'tableCreate';
|
3101 |
|
3102 | return TableCreate;
|
3103 |
|
3104 | })(RDBOp);
|
3105 |
|
3106 | TableDrop = (function(superClass) {
|
3107 | extend(TableDrop, superClass);
|
3108 |
|
3109 | function TableDrop() {
|
3110 | return TableDrop.__super__.constructor.apply(this, arguments);
|
3111 | }
|
3112 |
|
3113 | TableDrop.prototype.tt = protoTermType.TABLE_DROP;
|
3114 |
|
3115 | TableDrop.prototype.mt = 'tableDrop';
|
3116 |
|
3117 | return TableDrop;
|
3118 |
|
3119 | })(RDBOp);
|
3120 |
|
3121 | TableList = (function(superClass) {
|
3122 | extend(TableList, superClass);
|
3123 |
|
3124 | function TableList() {
|
3125 | return TableList.__super__.constructor.apply(this, arguments);
|
3126 | }
|
3127 |
|
3128 | TableList.prototype.tt = protoTermType.TABLE_LIST;
|
3129 |
|
3130 | TableList.prototype.mt = 'tableList';
|
3131 |
|
3132 | return TableList;
|
3133 |
|
3134 | })(RDBOp);
|
3135 |
|
3136 | IndexCreate = (function(superClass) {
|
3137 | extend(IndexCreate, superClass);
|
3138 |
|
3139 | function IndexCreate() {
|
3140 | return IndexCreate.__super__.constructor.apply(this, arguments);
|
3141 | }
|
3142 |
|
3143 | IndexCreate.prototype.tt = protoTermType.INDEX_CREATE;
|
3144 |
|
3145 | IndexCreate.prototype.mt = 'indexCreate';
|
3146 |
|
3147 | return IndexCreate;
|
3148 |
|
3149 | })(RDBOp);
|
3150 |
|
3151 | IndexDrop = (function(superClass) {
|
3152 | extend(IndexDrop, superClass);
|
3153 |
|
3154 | function IndexDrop() {
|
3155 | return IndexDrop.__super__.constructor.apply(this, arguments);
|
3156 | }
|
3157 |
|
3158 | IndexDrop.prototype.tt = protoTermType.INDEX_DROP;
|
3159 |
|
3160 | IndexDrop.prototype.mt = 'indexDrop';
|
3161 |
|
3162 | return IndexDrop;
|
3163 |
|
3164 | })(RDBOp);
|
3165 |
|
3166 | IndexRename = (function(superClass) {
|
3167 | extend(IndexRename, superClass);
|
3168 |
|
3169 | function IndexRename() {
|
3170 | return IndexRename.__super__.constructor.apply(this, arguments);
|
3171 | }
|
3172 |
|
3173 | IndexRename.prototype.tt = protoTermType.INDEX_RENAME;
|
3174 |
|
3175 | IndexRename.prototype.mt = 'indexRename';
|
3176 |
|
3177 | return IndexRename;
|
3178 |
|
3179 | })(RDBOp);
|
3180 |
|
3181 | IndexList = (function(superClass) {
|
3182 | extend(IndexList, superClass);
|
3183 |
|
3184 | function IndexList() {
|
3185 | return IndexList.__super__.constructor.apply(this, arguments);
|
3186 | }
|
3187 |
|
3188 | IndexList.prototype.tt = protoTermType.INDEX_LIST;
|
3189 |
|
3190 | IndexList.prototype.mt = 'indexList';
|
3191 |
|
3192 | return IndexList;
|
3193 |
|
3194 | })(RDBOp);
|
3195 |
|
3196 | IndexStatus = (function(superClass) {
|
3197 | extend(IndexStatus, superClass);
|
3198 |
|
3199 | function IndexStatus() {
|
3200 | return IndexStatus.__super__.constructor.apply(this, arguments);
|
3201 | }
|
3202 |
|
3203 | IndexStatus.prototype.tt = protoTermType.INDEX_STATUS;
|
3204 |
|
3205 | IndexStatus.prototype.mt = 'indexStatus';
|
3206 |
|
3207 | return IndexStatus;
|
3208 |
|
3209 | })(RDBOp);
|
3210 |
|
3211 | IndexWait = (function(superClass) {
|
3212 | extend(IndexWait, superClass);
|
3213 |
|
3214 | function IndexWait() {
|
3215 | return IndexWait.__super__.constructor.apply(this, arguments);
|
3216 | }
|
3217 |
|
3218 | IndexWait.prototype.tt = protoTermType.INDEX_WAIT;
|
3219 |
|
3220 | IndexWait.prototype.mt = 'indexWait';
|
3221 |
|
3222 | return IndexWait;
|
3223 |
|
3224 | })(RDBOp);
|
3225 |
|
3226 | Config = (function(superClass) {
|
3227 | extend(Config, superClass);
|
3228 |
|
3229 | function Config() {
|
3230 | return Config.__super__.constructor.apply(this, arguments);
|
3231 | }
|
3232 |
|
3233 | Config.prototype.tt = protoTermType.CONFIG;
|
3234 |
|
3235 | Config.prototype.mt = 'config';
|
3236 |
|
3237 | return Config;
|
3238 |
|
3239 | })(RDBOp);
|
3240 |
|
3241 | Status = (function(superClass) {
|
3242 | extend(Status, superClass);
|
3243 |
|
3244 | function Status() {
|
3245 | return Status.__super__.constructor.apply(this, arguments);
|
3246 | }
|
3247 |
|
3248 | Status.prototype.tt = protoTermType.STATUS;
|
3249 |
|
3250 | Status.prototype.mt = 'status';
|
3251 |
|
3252 | return Status;
|
3253 |
|
3254 | })(RDBOp);
|
3255 |
|
3256 | Wait = (function(superClass) {
|
3257 | extend(Wait, superClass);
|
3258 |
|
3259 | function Wait() {
|
3260 | return Wait.__super__.constructor.apply(this, arguments);
|
3261 | }
|
3262 |
|
3263 | Wait.prototype.tt = protoTermType.WAIT;
|
3264 |
|
3265 | Wait.prototype.mt = 'wait';
|
3266 |
|
3267 | return Wait;
|
3268 |
|
3269 | })(RDBOp);
|
3270 |
|
3271 | Reconfigure = (function(superClass) {
|
3272 | extend(Reconfigure, superClass);
|
3273 |
|
3274 | function Reconfigure() {
|
3275 | return Reconfigure.__super__.constructor.apply(this, arguments);
|
3276 | }
|
3277 |
|
3278 | Reconfigure.prototype.tt = protoTermType.RECONFIGURE;
|
3279 |
|
3280 | Reconfigure.prototype.mt = 'reconfigure';
|
3281 |
|
3282 | return Reconfigure;
|
3283 |
|
3284 | })(RDBOp);
|
3285 |
|
3286 | Rebalance = (function(superClass) {
|
3287 | extend(Rebalance, superClass);
|
3288 |
|
3289 | function Rebalance() {
|
3290 | return Rebalance.__super__.constructor.apply(this, arguments);
|
3291 | }
|
3292 |
|
3293 | Rebalance.prototype.tt = protoTermType.REBALANCE;
|
3294 |
|
3295 | Rebalance.prototype.mt = 'rebalance';
|
3296 |
|
3297 | return Rebalance;
|
3298 |
|
3299 | })(RDBOp);
|
3300 |
|
3301 | Sync = (function(superClass) {
|
3302 | extend(Sync, superClass);
|
3303 |
|
3304 | function Sync() {
|
3305 | return Sync.__super__.constructor.apply(this, arguments);
|
3306 | }
|
3307 |
|
3308 | Sync.prototype.tt = protoTermType.SYNC;
|
3309 |
|
3310 | Sync.prototype.mt = 'sync';
|
3311 |
|
3312 | return Sync;
|
3313 |
|
3314 | })(RDBOp);
|
3315 |
|
3316 | Grant = (function(superClass) {
|
3317 | extend(Grant, superClass);
|
3318 |
|
3319 | function Grant() {
|
3320 | return Grant.__super__.constructor.apply(this, arguments);
|
3321 | }
|
3322 |
|
3323 | Grant.prototype.tt = protoTermType.GRANT;
|
3324 |
|
3325 | Grant.prototype.mt = 'grant';
|
3326 |
|
3327 | return Grant;
|
3328 |
|
3329 | })(RDBOp);
|
3330 |
|
3331 | FunCall = (function(superClass) {
|
3332 | extend(FunCall, superClass);
|
3333 |
|
3334 | function FunCall() {
|
3335 | return FunCall.__super__.constructor.apply(this, arguments);
|
3336 | }
|
3337 |
|
3338 | FunCall.prototype.tt = protoTermType.FUNCALL;
|
3339 |
|
3340 | FunCall.prototype.st = 'do';
|
3341 |
|
3342 | FunCall.prototype.compose = function(args) {
|
3343 | if (args.length > 2) {
|
3344 | return ['r.do(', intsp(args.slice(1)), ', ', args[0], ')'];
|
3345 | } else {
|
3346 | if (shouldWrap(this.args[1])) {
|
3347 | args[1] = ['r(', args[1], ')'];
|
3348 | }
|
3349 | return [args[1], '.do(', args[0], ')'];
|
3350 | }
|
3351 | };
|
3352 |
|
3353 | return FunCall;
|
3354 |
|
3355 | })(RDBOp);
|
3356 |
|
3357 | Default = (function(superClass) {
|
3358 | extend(Default, superClass);
|
3359 |
|
3360 | function Default() {
|
3361 | return Default.__super__.constructor.apply(this, arguments);
|
3362 | }
|
3363 |
|
3364 | Default.prototype.tt = protoTermType.DEFAULT;
|
3365 |
|
3366 | Default.prototype.mt = 'default';
|
3367 |
|
3368 | return Default;
|
3369 |
|
3370 | })(RDBOp);
|
3371 |
|
3372 | Branch = (function(superClass) {
|
3373 | extend(Branch, superClass);
|
3374 |
|
3375 | function Branch() {
|
3376 | return Branch.__super__.constructor.apply(this, arguments);
|
3377 | }
|
3378 |
|
3379 | Branch.prototype.tt = protoTermType.BRANCH;
|
3380 |
|
3381 | Branch.prototype.st = 'branch';
|
3382 |
|
3383 | return Branch;
|
3384 |
|
3385 | })(RDBOp);
|
3386 |
|
3387 | Or = (function(superClass) {
|
3388 | extend(Or, superClass);
|
3389 |
|
3390 | function Or() {
|
3391 | return Or.__super__.constructor.apply(this, arguments);
|
3392 | }
|
3393 |
|
3394 | Or.prototype.tt = protoTermType.OR;
|
3395 |
|
3396 | Or.prototype.mt = 'or';
|
3397 |
|
3398 | return Or;
|
3399 |
|
3400 | })(RDBOp);
|
3401 |
|
3402 | And = (function(superClass) {
|
3403 | extend(And, superClass);
|
3404 |
|
3405 | function And() {
|
3406 | return And.__super__.constructor.apply(this, arguments);
|
3407 | }
|
3408 |
|
3409 | And.prototype.tt = protoTermType.AND;
|
3410 |
|
3411 | And.prototype.mt = 'and';
|
3412 |
|
3413 | return And;
|
3414 |
|
3415 | })(RDBOp);
|
3416 |
|
3417 | ForEach = (function(superClass) {
|
3418 | extend(ForEach, superClass);
|
3419 |
|
3420 | function ForEach() {
|
3421 | return ForEach.__super__.constructor.apply(this, arguments);
|
3422 | }
|
3423 |
|
3424 | ForEach.prototype.tt = protoTermType.FOR_EACH;
|
3425 |
|
3426 | ForEach.prototype.mt = 'forEach';
|
3427 |
|
3428 | return ForEach;
|
3429 |
|
3430 | })(RDBOp);
|
3431 |
|
3432 | Func = (function(superClass) {
|
3433 | extend(Func, superClass);
|
3434 |
|
3435 | Func.prototype.tt = protoTermType.FUNC;
|
3436 |
|
3437 | Func.nextVarId = 0;
|
3438 |
|
3439 | function Func(optargs, func) {
|
3440 | var argNums, args, argsArr, body, i;
|
3441 | args = [];
|
3442 | argNums = [];
|
3443 | i = 0;
|
3444 | while (i < func.length) {
|
3445 | argNums.push(Func.nextVarId);
|
3446 | args.push(new Var({}, Func.nextVarId));
|
3447 | Func.nextVarId++;
|
3448 | i++;
|
3449 | }
|
3450 | body = func.apply(null, args);
|
3451 | if (body === void 0) {
|
3452 | throw new err.ReqlDriverCompileError("Anonymous function returned `undefined`. Did you forget a `return`?");
|
3453 | }
|
3454 | argsArr = (function(func, args, ctor) {
|
3455 | ctor.prototype = func.prototype;
|
3456 | var child = new ctor, result = func.apply(child, args);
|
3457 | return Object(result) === result ? result : child;
|
3458 | })(MakeArray, [{}].concat(slice.call(argNums)), function(){});
|
3459 | return Func.__super__.constructor.call(this, optargs, argsArr, body);
|
3460 | }
|
3461 |
|
3462 | Func.prototype.compose = function(args) {
|
3463 | var arg, i, j, len, ref, varStr;
|
3464 | if (hasImplicit(args[1]) === true) {
|
3465 | return [args[1]];
|
3466 | } else {
|
3467 | varStr = "";
|
3468 | ref = args[0][1];
|
3469 | for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
3470 | arg = ref[i];
|
3471 | if (i % 2 === 0) {
|
3472 | varStr += Var.prototype.compose(arg);
|
3473 | } else {
|
3474 | varStr += arg;
|
3475 | }
|
3476 | }
|
3477 | return ['function(', varStr, ') { return ', args[1], '; }'];
|
3478 | }
|
3479 | };
|
3480 |
|
3481 | return Func;
|
3482 |
|
3483 | })(RDBOp);
|
3484 |
|
3485 | Asc = (function(superClass) {
|
3486 | extend(Asc, superClass);
|
3487 |
|
3488 | function Asc() {
|
3489 | return Asc.__super__.constructor.apply(this, arguments);
|
3490 | }
|
3491 |
|
3492 | Asc.prototype.tt = protoTermType.ASC;
|
3493 |
|
3494 | Asc.prototype.st = 'asc';
|
3495 |
|
3496 | return Asc;
|
3497 |
|
3498 | })(RDBOp);
|
3499 |
|
3500 | Desc = (function(superClass) {
|
3501 | extend(Desc, superClass);
|
3502 |
|
3503 | function Desc() {
|
3504 | return Desc.__super__.constructor.apply(this, arguments);
|
3505 | }
|
3506 |
|
3507 | Desc.prototype.tt = protoTermType.DESC;
|
3508 |
|
3509 | Desc.prototype.st = 'desc';
|
3510 |
|
3511 | return Desc;
|
3512 |
|
3513 | })(RDBOp);
|
3514 |
|
3515 | Literal = (function(superClass) {
|
3516 | extend(Literal, superClass);
|
3517 |
|
3518 | function Literal() {
|
3519 | return Literal.__super__.constructor.apply(this, arguments);
|
3520 | }
|
3521 |
|
3522 | Literal.prototype.tt = protoTermType.LITERAL;
|
3523 |
|
3524 | Literal.prototype.st = 'literal';
|
3525 |
|
3526 | return Literal;
|
3527 |
|
3528 | })(RDBOp);
|
3529 |
|
3530 | ISO8601 = (function(superClass) {
|
3531 | extend(ISO8601, superClass);
|
3532 |
|
3533 | function ISO8601() {
|
3534 | return ISO8601.__super__.constructor.apply(this, arguments);
|
3535 | }
|
3536 |
|
3537 | ISO8601.prototype.tt = protoTermType.ISO8601;
|
3538 |
|
3539 | ISO8601.prototype.st = 'ISO8601';
|
3540 |
|
3541 | return ISO8601;
|
3542 |
|
3543 | })(RDBOp);
|
3544 |
|
3545 | ToISO8601 = (function(superClass) {
|
3546 | extend(ToISO8601, superClass);
|
3547 |
|
3548 | function ToISO8601() {
|
3549 | return ToISO8601.__super__.constructor.apply(this, arguments);
|
3550 | }
|
3551 |
|
3552 | ToISO8601.prototype.tt = protoTermType.TO_ISO8601;
|
3553 |
|
3554 | ToISO8601.prototype.mt = 'toISO8601';
|
3555 |
|
3556 | return ToISO8601;
|
3557 |
|
3558 | })(RDBOp);
|
3559 |
|
3560 | EpochTime = (function(superClass) {
|
3561 | extend(EpochTime, superClass);
|
3562 |
|
3563 | function EpochTime() {
|
3564 | return EpochTime.__super__.constructor.apply(this, arguments);
|
3565 | }
|
3566 |
|
3567 | EpochTime.prototype.tt = protoTermType.EPOCH_TIME;
|
3568 |
|
3569 | EpochTime.prototype.st = 'epochTime';
|
3570 |
|
3571 | return EpochTime;
|
3572 |
|
3573 | })(RDBOp);
|
3574 |
|
3575 | ToEpochTime = (function(superClass) {
|
3576 | extend(ToEpochTime, superClass);
|
3577 |
|
3578 | function ToEpochTime() {
|
3579 | return ToEpochTime.__super__.constructor.apply(this, arguments);
|
3580 | }
|
3581 |
|
3582 | ToEpochTime.prototype.tt = protoTermType.TO_EPOCH_TIME;
|
3583 |
|
3584 | ToEpochTime.prototype.mt = 'toEpochTime';
|
3585 |
|
3586 | return ToEpochTime;
|
3587 |
|
3588 | })(RDBOp);
|
3589 |
|
3590 | Now = (function(superClass) {
|
3591 | extend(Now, superClass);
|
3592 |
|
3593 | function Now() {
|
3594 | return Now.__super__.constructor.apply(this, arguments);
|
3595 | }
|
3596 |
|
3597 | Now.prototype.tt = protoTermType.NOW;
|
3598 |
|
3599 | Now.prototype.st = 'now';
|
3600 |
|
3601 | return Now;
|
3602 |
|
3603 | })(RDBOp);
|
3604 |
|
3605 | InTimezone = (function(superClass) {
|
3606 | extend(InTimezone, superClass);
|
3607 |
|
3608 | function InTimezone() {
|
3609 | return InTimezone.__super__.constructor.apply(this, arguments);
|
3610 | }
|
3611 |
|
3612 | InTimezone.prototype.tt = protoTermType.IN_TIMEZONE;
|
3613 |
|
3614 | InTimezone.prototype.mt = 'inTimezone';
|
3615 |
|
3616 | return InTimezone;
|
3617 |
|
3618 | })(RDBOp);
|
3619 |
|
3620 | During = (function(superClass) {
|
3621 | extend(During, superClass);
|
3622 |
|
3623 | function During() {
|
3624 | return During.__super__.constructor.apply(this, arguments);
|
3625 | }
|
3626 |
|
3627 | During.prototype.tt = protoTermType.DURING;
|
3628 |
|
3629 | During.prototype.mt = 'during';
|
3630 |
|
3631 | return During;
|
3632 |
|
3633 | })(RDBOp);
|
3634 |
|
3635 | RQLDate = (function(superClass) {
|
3636 | extend(RQLDate, superClass);
|
3637 |
|
3638 | function RQLDate() {
|
3639 | return RQLDate.__super__.constructor.apply(this, arguments);
|
3640 | }
|
3641 |
|
3642 | RQLDate.prototype.tt = protoTermType.DATE;
|
3643 |
|
3644 | RQLDate.prototype.mt = 'date';
|
3645 |
|
3646 | return RQLDate;
|
3647 |
|
3648 | })(RDBOp);
|
3649 |
|
3650 | TimeOfDay = (function(superClass) {
|
3651 | extend(TimeOfDay, superClass);
|
3652 |
|
3653 | function TimeOfDay() {
|
3654 | return TimeOfDay.__super__.constructor.apply(this, arguments);
|
3655 | }
|
3656 |
|
3657 | TimeOfDay.prototype.tt = protoTermType.TIME_OF_DAY;
|
3658 |
|
3659 | TimeOfDay.prototype.mt = 'timeOfDay';
|
3660 |
|
3661 | return TimeOfDay;
|
3662 |
|
3663 | })(RDBOp);
|
3664 |
|
3665 | Timezone = (function(superClass) {
|
3666 | extend(Timezone, superClass);
|
3667 |
|
3668 | function Timezone() {
|
3669 | return Timezone.__super__.constructor.apply(this, arguments);
|
3670 | }
|
3671 |
|
3672 | Timezone.prototype.tt = protoTermType.TIMEZONE;
|
3673 |
|
3674 | Timezone.prototype.mt = 'timezone';
|
3675 |
|
3676 | return Timezone;
|
3677 |
|
3678 | })(RDBOp);
|
3679 |
|
3680 | Year = (function(superClass) {
|
3681 | extend(Year, superClass);
|
3682 |
|
3683 | function Year() {
|
3684 | return Year.__super__.constructor.apply(this, arguments);
|
3685 | }
|
3686 |
|
3687 | Year.prototype.tt = protoTermType.YEAR;
|
3688 |
|
3689 | Year.prototype.mt = 'year';
|
3690 |
|
3691 | return Year;
|
3692 |
|
3693 | })(RDBOp);
|
3694 |
|
3695 | Month = (function(superClass) {
|
3696 | extend(Month, superClass);
|
3697 |
|
3698 | function Month() {
|
3699 | return Month.__super__.constructor.apply(this, arguments);
|
3700 | }
|
3701 |
|
3702 | Month.prototype.tt = protoTermType.MONTH;
|
3703 |
|
3704 | Month.prototype.mt = 'month';
|
3705 |
|
3706 | return Month;
|
3707 |
|
3708 | })(RDBOp);
|
3709 |
|
3710 | Day = (function(superClass) {
|
3711 | extend(Day, superClass);
|
3712 |
|
3713 | function Day() {
|
3714 | return Day.__super__.constructor.apply(this, arguments);
|
3715 | }
|
3716 |
|
3717 | Day.prototype.tt = protoTermType.DAY;
|
3718 |
|
3719 | Day.prototype.mt = 'day';
|
3720 |
|
3721 | return Day;
|
3722 |
|
3723 | })(RDBOp);
|
3724 |
|
3725 | DayOfWeek = (function(superClass) {
|
3726 | extend(DayOfWeek, superClass);
|
3727 |
|
3728 | function DayOfWeek() {
|
3729 | return DayOfWeek.__super__.constructor.apply(this, arguments);
|
3730 | }
|
3731 |
|
3732 | DayOfWeek.prototype.tt = protoTermType.DAY_OF_WEEK;
|
3733 |
|
3734 | DayOfWeek.prototype.mt = 'dayOfWeek';
|
3735 |
|
3736 | return DayOfWeek;
|
3737 |
|
3738 | })(RDBOp);
|
3739 |
|
3740 | DayOfYear = (function(superClass) {
|
3741 | extend(DayOfYear, superClass);
|
3742 |
|
3743 | function DayOfYear() {
|
3744 | return DayOfYear.__super__.constructor.apply(this, arguments);
|
3745 | }
|
3746 |
|
3747 | DayOfYear.prototype.tt = protoTermType.DAY_OF_YEAR;
|
3748 |
|
3749 | DayOfYear.prototype.mt = 'dayOfYear';
|
3750 |
|
3751 | return DayOfYear;
|
3752 |
|
3753 | })(RDBOp);
|
3754 |
|
3755 | Hours = (function(superClass) {
|
3756 | extend(Hours, superClass);
|
3757 |
|
3758 | function Hours() {
|
3759 | return Hours.__super__.constructor.apply(this, arguments);
|
3760 | }
|
3761 |
|
3762 | Hours.prototype.tt = protoTermType.HOURS;
|
3763 |
|
3764 | Hours.prototype.mt = 'hours';
|
3765 |
|
3766 | return Hours;
|
3767 |
|
3768 | })(RDBOp);
|
3769 |
|
3770 | Minutes = (function(superClass) {
|
3771 | extend(Minutes, superClass);
|
3772 |
|
3773 | function Minutes() {
|
3774 | return Minutes.__super__.constructor.apply(this, arguments);
|
3775 | }
|
3776 |
|
3777 | Minutes.prototype.tt = protoTermType.MINUTES;
|
3778 |
|
3779 | Minutes.prototype.mt = 'minutes';
|
3780 |
|
3781 | return Minutes;
|
3782 |
|
3783 | })(RDBOp);
|
3784 |
|
3785 | Seconds = (function(superClass) {
|
3786 | extend(Seconds, superClass);
|
3787 |
|
3788 | function Seconds() {
|
3789 | return Seconds.__super__.constructor.apply(this, arguments);
|
3790 | }
|
3791 |
|
3792 | Seconds.prototype.tt = protoTermType.SECONDS;
|
3793 |
|
3794 | Seconds.prototype.mt = 'seconds';
|
3795 |
|
3796 | return Seconds;
|
3797 |
|
3798 | })(RDBOp);
|
3799 |
|
3800 | Time = (function(superClass) {
|
3801 | extend(Time, superClass);
|
3802 |
|
3803 | function Time() {
|
3804 | return Time.__super__.constructor.apply(this, arguments);
|
3805 | }
|
3806 |
|
3807 | Time.prototype.tt = protoTermType.TIME;
|
3808 |
|
3809 | Time.prototype.st = 'time';
|
3810 |
|
3811 | return Time;
|
3812 |
|
3813 | })(RDBOp);
|
3814 |
|
3815 | Geojson = (function(superClass) {
|
3816 | extend(Geojson, superClass);
|
3817 |
|
3818 | function Geojson() {
|
3819 | return Geojson.__super__.constructor.apply(this, arguments);
|
3820 | }
|
3821 |
|
3822 | Geojson.prototype.tt = protoTermType.GEOJSON;
|
3823 |
|
3824 | Geojson.prototype.st = 'geojson';
|
3825 |
|
3826 | return Geojson;
|
3827 |
|
3828 | })(RDBOp);
|
3829 |
|
3830 | ToGeojson = (function(superClass) {
|
3831 | extend(ToGeojson, superClass);
|
3832 |
|
3833 | function ToGeojson() {
|
3834 | return ToGeojson.__super__.constructor.apply(this, arguments);
|
3835 | }
|
3836 |
|
3837 | ToGeojson.prototype.tt = protoTermType.TO_GEOJSON;
|
3838 |
|
3839 | ToGeojson.prototype.mt = 'toGeojson';
|
3840 |
|
3841 | return ToGeojson;
|
3842 |
|
3843 | })(RDBOp);
|
3844 |
|
3845 | Point = (function(superClass) {
|
3846 | extend(Point, superClass);
|
3847 |
|
3848 | function Point() {
|
3849 | return Point.__super__.constructor.apply(this, arguments);
|
3850 | }
|
3851 |
|
3852 | Point.prototype.tt = protoTermType.POINT;
|
3853 |
|
3854 | Point.prototype.st = 'point';
|
3855 |
|
3856 | return Point;
|
3857 |
|
3858 | })(RDBOp);
|
3859 |
|
3860 | Line = (function(superClass) {
|
3861 | extend(Line, superClass);
|
3862 |
|
3863 | function Line() {
|
3864 | return Line.__super__.constructor.apply(this, arguments);
|
3865 | }
|
3866 |
|
3867 | Line.prototype.tt = protoTermType.LINE;
|
3868 |
|
3869 | Line.prototype.st = 'line';
|
3870 |
|
3871 | return Line;
|
3872 |
|
3873 | })(RDBOp);
|
3874 |
|
3875 | Polygon = (function(superClass) {
|
3876 | extend(Polygon, superClass);
|
3877 |
|
3878 | function Polygon() {
|
3879 | return Polygon.__super__.constructor.apply(this, arguments);
|
3880 | }
|
3881 |
|
3882 | Polygon.prototype.tt = protoTermType.POLYGON;
|
3883 |
|
3884 | Polygon.prototype.st = 'polygon';
|
3885 |
|
3886 | return Polygon;
|
3887 |
|
3888 | })(RDBOp);
|
3889 |
|
3890 | Distance = (function(superClass) {
|
3891 | extend(Distance, superClass);
|
3892 |
|
3893 | function Distance() {
|
3894 | return Distance.__super__.constructor.apply(this, arguments);
|
3895 | }
|
3896 |
|
3897 | Distance.prototype.tt = protoTermType.DISTANCE;
|
3898 |
|
3899 | Distance.prototype.mt = 'distance';
|
3900 |
|
3901 | return Distance;
|
3902 |
|
3903 | })(RDBOp);
|
3904 |
|
3905 | Intersects = (function(superClass) {
|
3906 | extend(Intersects, superClass);
|
3907 |
|
3908 | function Intersects() {
|
3909 | return Intersects.__super__.constructor.apply(this, arguments);
|
3910 | }
|
3911 |
|
3912 | Intersects.prototype.tt = protoTermType.INTERSECTS;
|
3913 |
|
3914 | Intersects.prototype.mt = 'intersects';
|
3915 |
|
3916 | return Intersects;
|
3917 |
|
3918 | })(RDBOp);
|
3919 |
|
3920 | Includes = (function(superClass) {
|
3921 | extend(Includes, superClass);
|
3922 |
|
3923 | function Includes() {
|
3924 | return Includes.__super__.constructor.apply(this, arguments);
|
3925 | }
|
3926 |
|
3927 | Includes.prototype.tt = protoTermType.INCLUDES;
|
3928 |
|
3929 | Includes.prototype.mt = 'includes';
|
3930 |
|
3931 | return Includes;
|
3932 |
|
3933 | })(RDBOp);
|
3934 |
|
3935 | Circle = (function(superClass) {
|
3936 | extend(Circle, superClass);
|
3937 |
|
3938 | function Circle() {
|
3939 | return Circle.__super__.constructor.apply(this, arguments);
|
3940 | }
|
3941 |
|
3942 | Circle.prototype.tt = protoTermType.CIRCLE;
|
3943 |
|
3944 | Circle.prototype.st = 'circle';
|
3945 |
|
3946 | return Circle;
|
3947 |
|
3948 | })(RDBOp);
|
3949 |
|
3950 | GetIntersecting = (function(superClass) {
|
3951 | extend(GetIntersecting, superClass);
|
3952 |
|
3953 | function GetIntersecting() {
|
3954 | return GetIntersecting.__super__.constructor.apply(this, arguments);
|
3955 | }
|
3956 |
|
3957 | GetIntersecting.prototype.tt = protoTermType.GET_INTERSECTING;
|
3958 |
|
3959 | GetIntersecting.prototype.mt = 'getIntersecting';
|
3960 |
|
3961 | return GetIntersecting;
|
3962 |
|
3963 | })(RDBOp);
|
3964 |
|
3965 | GetNearest = (function(superClass) {
|
3966 | extend(GetNearest, superClass);
|
3967 |
|
3968 | function GetNearest() {
|
3969 | return GetNearest.__super__.constructor.apply(this, arguments);
|
3970 | }
|
3971 |
|
3972 | GetNearest.prototype.tt = protoTermType.GET_NEAREST;
|
3973 |
|
3974 | GetNearest.prototype.mt = 'getNearest';
|
3975 |
|
3976 | return GetNearest;
|
3977 |
|
3978 | })(RDBOp);
|
3979 |
|
3980 | Fill = (function(superClass) {
|
3981 | extend(Fill, superClass);
|
3982 |
|
3983 | function Fill() {
|
3984 | return Fill.__super__.constructor.apply(this, arguments);
|
3985 | }
|
3986 |
|
3987 | Fill.prototype.tt = protoTermType.FILL;
|
3988 |
|
3989 | Fill.prototype.mt = 'fill';
|
3990 |
|
3991 | return Fill;
|
3992 |
|
3993 | })(RDBOp);
|
3994 |
|
3995 | PolygonSub = (function(superClass) {
|
3996 | extend(PolygonSub, superClass);
|
3997 |
|
3998 | function PolygonSub() {
|
3999 | return PolygonSub.__super__.constructor.apply(this, arguments);
|
4000 | }
|
4001 |
|
4002 | PolygonSub.prototype.tt = protoTermType.POLYGON_SUB;
|
4003 |
|
4004 | PolygonSub.prototype.mt = 'polygonSub';
|
4005 |
|
4006 | return PolygonSub;
|
4007 |
|
4008 | })(RDBOp);
|
4009 |
|
4010 | UUID = (function(superClass) {
|
4011 | extend(UUID, superClass);
|
4012 |
|
4013 | function UUID() {
|
4014 | return UUID.__super__.constructor.apply(this, arguments);
|
4015 | }
|
4016 |
|
4017 | UUID.prototype.tt = protoTermType.UUID;
|
4018 |
|
4019 | UUID.prototype.st = 'uuid';
|
4020 |
|
4021 | return UUID;
|
4022 |
|
4023 | })(RDBOp);
|
4024 |
|
4025 | rethinkdb.expr = varar(1, 2, function(val, nestingDepth) {
|
4026 | var v;
|
4027 | if (nestingDepth == null) {
|
4028 | nestingDepth = 20;
|
4029 | }
|
4030 | if (val === void 0) {
|
4031 | throw new err.ReqlDriverCompileError("Cannot wrap undefined with r.expr().");
|
4032 | }
|
4033 | if (nestingDepth <= 0) {
|
4034 | throw new err.ReqlDriverCompileError("Nesting depth limit exceeded.");
|
4035 | }
|
4036 | if (typeof nestingDepth !== "number" || isNaN(nestingDepth)) {
|
4037 | throw new err.ReqlDriverCompileError("Second argument to `r.expr` must be a number or undefined.");
|
4038 | } else if (val instanceof TermBase) {
|
4039 | return val;
|
4040 | } else if (typeof val === 'function') {
|
4041 | return new Func({}, val);
|
4042 | } else if (val instanceof Date) {
|
4043 | return new ISO8601({}, val.toISOString());
|
4044 | } else if (val instanceof Buffer) {
|
4045 | return new Binary(val);
|
4046 | } else if (Array.isArray(val)) {
|
4047 | val = (function() {
|
4048 | var j, len, results;
|
4049 | results = [];
|
4050 | for (j = 0, len = val.length; j < len; j++) {
|
4051 | v = val[j];
|
4052 | results.push(rethinkdb.expr(v, nestingDepth - 1));
|
4053 | }
|
4054 | return results;
|
4055 | })();
|
4056 | return (function(func, args, ctor) {
|
4057 | ctor.prototype = func.prototype;
|
4058 | var child = new ctor, result = func.apply(child, args);
|
4059 | return Object(result) === result ? result : child;
|
4060 | })(MakeArray, [{}].concat(slice.call(val)), function(){});
|
4061 | } else if (typeof val === 'number') {
|
4062 | return new DatumTerm(val);
|
4063 | } else if (Object.prototype.toString.call(val) === '[object Object]') {
|
4064 | return new MakeObject(val, nestingDepth);
|
4065 | } else {
|
4066 | return new DatumTerm(val);
|
4067 | }
|
4068 | });
|
4069 |
|
4070 | rethinkdb.js = aropt(function(jssrc, opts) {
|
4071 | return new JavaScript(opts, jssrc);
|
4072 | });
|
4073 |
|
4074 | rethinkdb.http = aropt(function(url, opts) {
|
4075 | return new Http(opts, url);
|
4076 | });
|
4077 |
|
4078 | rethinkdb.json = function() {
|
4079 | var args;
|
4080 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4081 | return (function(func, args, ctor) {
|
4082 | ctor.prototype = func.prototype;
|
4083 | var child = new ctor, result = func.apply(child, args);
|
4084 | return Object(result) === result ? result : child;
|
4085 | })(Json, [{}].concat(slice.call(args)), function(){});
|
4086 | };
|
4087 |
|
4088 | rethinkdb.error = function() {
|
4089 | var args;
|
4090 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4091 | return (function(func, args, ctor) {
|
4092 | ctor.prototype = func.prototype;
|
4093 | var child = new ctor, result = func.apply(child, args);
|
4094 | return Object(result) === result ? result : child;
|
4095 | })(UserError, [{}].concat(slice.call(args)), function(){});
|
4096 | };
|
4097 |
|
4098 | rethinkdb.random = function() {
|
4099 | var limits, limitsAndOpts, opts, perhapsOptDict;
|
4100 | limitsAndOpts = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4101 | opts = {};
|
4102 | limits = limitsAndOpts;
|
4103 | perhapsOptDict = limitsAndOpts[limitsAndOpts.length - 1];
|
4104 | if (perhapsOptDict && ((Object.prototype.toString.call(perhapsOptDict) === '[object Object]') && !(perhapsOptDict instanceof TermBase))) {
|
4105 | opts = perhapsOptDict;
|
4106 | limits = limitsAndOpts.slice(0, limitsAndOpts.length - 1);
|
4107 | }
|
4108 | return (function(func, args, ctor) {
|
4109 | ctor.prototype = func.prototype;
|
4110 | var child = new ctor, result = func.apply(child, args);
|
4111 | return Object(result) === result ? result : child;
|
4112 | })(Random, [opts].concat(slice.call(limits)), function(){});
|
4113 | };
|
4114 |
|
4115 | rethinkdb.binary = ar(function(data) {
|
4116 | return new Binary(data);
|
4117 | });
|
4118 |
|
4119 | rethinkdb.row = new ImplicitVar({});
|
4120 |
|
4121 | rethinkdb.table = aropt(function(tblName, opts) {
|
4122 | return new Table(opts, tblName);
|
4123 | });
|
4124 |
|
4125 | rethinkdb.db = function() {
|
4126 | var args;
|
4127 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4128 | return (function(func, args, ctor) {
|
4129 | ctor.prototype = func.prototype;
|
4130 | var child = new ctor, result = func.apply(child, args);
|
4131 | return Object(result) === result ? result : child;
|
4132 | })(Db, [{}].concat(slice.call(args)), function(){});
|
4133 | };
|
4134 |
|
4135 | rethinkdb.dbCreate = function() {
|
4136 | var args;
|
4137 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4138 | return (function(func, args, ctor) {
|
4139 | ctor.prototype = func.prototype;
|
4140 | var child = new ctor, result = func.apply(child, args);
|
4141 | return Object(result) === result ? result : child;
|
4142 | })(DbCreate, [{}].concat(slice.call(args)), function(){});
|
4143 | };
|
4144 |
|
4145 | rethinkdb.dbDrop = function() {
|
4146 | var args;
|
4147 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4148 | return (function(func, args, ctor) {
|
4149 | ctor.prototype = func.prototype;
|
4150 | var child = new ctor, result = func.apply(child, args);
|
4151 | return Object(result) === result ? result : child;
|
4152 | })(DbDrop, [{}].concat(slice.call(args)), function(){});
|
4153 | };
|
4154 |
|
4155 | rethinkdb.dbList = function() {
|
4156 | var args;
|
4157 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4158 | return (function(func, args, ctor) {
|
4159 | ctor.prototype = func.prototype;
|
4160 | var child = new ctor, result = func.apply(child, args);
|
4161 | return Object(result) === result ? result : child;
|
4162 | })(DbList, [{}].concat(slice.call(args)), function(){});
|
4163 | };
|
4164 |
|
4165 | rethinkdb.tableCreate = aropt(function(tblName, opts) {
|
4166 | return new TableCreate(opts, tblName);
|
4167 | });
|
4168 |
|
4169 | rethinkdb.tableDrop = function() {
|
4170 | var args;
|
4171 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4172 | return (function(func, args, ctor) {
|
4173 | ctor.prototype = func.prototype;
|
4174 | var child = new ctor, result = func.apply(child, args);
|
4175 | return Object(result) === result ? result : child;
|
4176 | })(TableDrop, [{}].concat(slice.call(args)), function(){});
|
4177 | };
|
4178 |
|
4179 | rethinkdb.tableList = function() {
|
4180 | var args;
|
4181 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4182 | return (function(func, args, ctor) {
|
4183 | ctor.prototype = func.prototype;
|
4184 | var child = new ctor, result = func.apply(child, args);
|
4185 | return Object(result) === result ? result : child;
|
4186 | })(TableList, [{}].concat(slice.call(args)), function(){});
|
4187 | };
|
4188 |
|
4189 | rethinkdb.grant = function() {
|
4190 | var args;
|
4191 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4192 | return (function(func, args, ctor) {
|
4193 | ctor.prototype = func.prototype;
|
4194 | var child = new ctor, result = func.apply(child, args);
|
4195 | return Object(result) === result ? result : child;
|
4196 | })(Grant, [{}].concat(slice.call(args)), function(){});
|
4197 | };
|
4198 |
|
4199 | rethinkdb["do"] = varar(1, null, function() {
|
4200 | var args;
|
4201 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4202 | return (function(func, args, ctor) {
|
4203 | ctor.prototype = func.prototype;
|
4204 | var child = new ctor, result = func.apply(child, args);
|
4205 | return Object(result) === result ? result : child;
|
4206 | })(FunCall, [{}, funcWrap(args.slice(-1)[0])].concat(slice.call(args.slice(0, -1))), function(){});
|
4207 | });
|
4208 |
|
4209 | rethinkdb.branch = function() {
|
4210 | var args;
|
4211 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4212 | return (function(func, args, ctor) {
|
4213 | ctor.prototype = func.prototype;
|
4214 | var child = new ctor, result = func.apply(child, args);
|
4215 | return Object(result) === result ? result : child;
|
4216 | })(Branch, [{}].concat(slice.call(args)), function(){});
|
4217 | };
|
4218 |
|
4219 | rethinkdb.map = varar(1, null, function() {
|
4220 | var args, funcArg, j;
|
4221 | args = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), funcArg = arguments[j++];
|
4222 | return (function(func, args, ctor) {
|
4223 | ctor.prototype = func.prototype;
|
4224 | var child = new ctor, result = func.apply(child, args);
|
4225 | return Object(result) === result ? result : child;
|
4226 | })(Map, [{}].concat(slice.call(args), [funcWrap(funcArg)]), function(){});
|
4227 | });
|
4228 |
|
4229 | rethinkdb.group = function() {
|
4230 | var args;
|
4231 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4232 | return (function(func, args, ctor) {
|
4233 | ctor.prototype = func.prototype;
|
4234 | var child = new ctor, result = func.apply(child, args);
|
4235 | return Object(result) === result ? result : child;
|
4236 | })(Group, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4237 | };
|
4238 |
|
4239 | rethinkdb.reduce = function() {
|
4240 | var args;
|
4241 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4242 | return (function(func, args, ctor) {
|
4243 | ctor.prototype = func.prototype;
|
4244 | var child = new ctor, result = func.apply(child, args);
|
4245 | return Object(result) === result ? result : child;
|
4246 | })(Reduce, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4247 | };
|
4248 |
|
4249 | rethinkdb.count = function() {
|
4250 | var args;
|
4251 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4252 | return (function(func, args, ctor) {
|
4253 | ctor.prototype = func.prototype;
|
4254 | var child = new ctor, result = func.apply(child, args);
|
4255 | return Object(result) === result ? result : child;
|
4256 | })(Count, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4257 | };
|
4258 |
|
4259 | rethinkdb.sum = function() {
|
4260 | var args;
|
4261 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4262 | return (function(func, args, ctor) {
|
4263 | ctor.prototype = func.prototype;
|
4264 | var child = new ctor, result = func.apply(child, args);
|
4265 | return Object(result) === result ? result : child;
|
4266 | })(Sum, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4267 | };
|
4268 |
|
4269 | rethinkdb.avg = function() {
|
4270 | var args;
|
4271 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4272 | return (function(func, args, ctor) {
|
4273 | ctor.prototype = func.prototype;
|
4274 | var child = new ctor, result = func.apply(child, args);
|
4275 | return Object(result) === result ? result : child;
|
4276 | })(Avg, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4277 | };
|
4278 |
|
4279 | rethinkdb.min = function() {
|
4280 | var args;
|
4281 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4282 | return (function(func, args, ctor) {
|
4283 | ctor.prototype = func.prototype;
|
4284 | var child = new ctor, result = func.apply(child, args);
|
4285 | return Object(result) === result ? result : child;
|
4286 | })(Min, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4287 | };
|
4288 |
|
4289 | rethinkdb.max = function() {
|
4290 | var args;
|
4291 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4292 | return (function(func, args, ctor) {
|
4293 | ctor.prototype = func.prototype;
|
4294 | var child = new ctor, result = func.apply(child, args);
|
4295 | return Object(result) === result ? result : child;
|
4296 | })(Max, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4297 | };
|
4298 |
|
4299 | rethinkdb.distinct = function() {
|
4300 | var args;
|
4301 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4302 | return (function(func, args, ctor) {
|
4303 | ctor.prototype = func.prototype;
|
4304 | var child = new ctor, result = func.apply(child, args);
|
4305 | return Object(result) === result ? result : child;
|
4306 | })(Distinct, [{}].concat(slice.call(args)), function(){});
|
4307 | };
|
4308 |
|
4309 | rethinkdb.contains = function() {
|
4310 | var args;
|
4311 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4312 | return (function(func, args, ctor) {
|
4313 | ctor.prototype = func.prototype;
|
4314 | var child = new ctor, result = func.apply(child, args);
|
4315 | return Object(result) === result ? result : child;
|
4316 | })(Contains, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4317 | };
|
4318 |
|
4319 | rethinkdb.asc = function() {
|
4320 | var args;
|
4321 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4322 | return (function(func, args, ctor) {
|
4323 | ctor.prototype = func.prototype;
|
4324 | var child = new ctor, result = func.apply(child, args);
|
4325 | return Object(result) === result ? result : child;
|
4326 | })(Asc, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4327 | };
|
4328 |
|
4329 | rethinkdb.desc = function() {
|
4330 | var args;
|
4331 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4332 | return (function(func, args, ctor) {
|
4333 | ctor.prototype = func.prototype;
|
4334 | var child = new ctor, result = func.apply(child, args);
|
4335 | return Object(result) === result ? result : child;
|
4336 | })(Desc, [{}].concat(slice.call(args.map(funcWrap))), function(){});
|
4337 | };
|
4338 |
|
4339 | rethinkdb.eq = function() {
|
4340 | var args;
|
4341 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4342 | return (function(func, args, ctor) {
|
4343 | ctor.prototype = func.prototype;
|
4344 | var child = new ctor, result = func.apply(child, args);
|
4345 | return Object(result) === result ? result : child;
|
4346 | })(Eq, [{}].concat(slice.call(args)), function(){});
|
4347 | };
|
4348 |
|
4349 | rethinkdb.ne = function() {
|
4350 | var args;
|
4351 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4352 | return (function(func, args, ctor) {
|
4353 | ctor.prototype = func.prototype;
|
4354 | var child = new ctor, result = func.apply(child, args);
|
4355 | return Object(result) === result ? result : child;
|
4356 | })(Ne, [{}].concat(slice.call(args)), function(){});
|
4357 | };
|
4358 |
|
4359 | rethinkdb.lt = function() {
|
4360 | var args;
|
4361 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4362 | return (function(func, args, ctor) {
|
4363 | ctor.prototype = func.prototype;
|
4364 | var child = new ctor, result = func.apply(child, args);
|
4365 | return Object(result) === result ? result : child;
|
4366 | })(Lt, [{}].concat(slice.call(args)), function(){});
|
4367 | };
|
4368 |
|
4369 | rethinkdb.le = function() {
|
4370 | var args;
|
4371 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4372 | return (function(func, args, ctor) {
|
4373 | ctor.prototype = func.prototype;
|
4374 | var child = new ctor, result = func.apply(child, args);
|
4375 | return Object(result) === result ? result : child;
|
4376 | })(Le, [{}].concat(slice.call(args)), function(){});
|
4377 | };
|
4378 |
|
4379 | rethinkdb.gt = function() {
|
4380 | var args;
|
4381 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4382 | return (function(func, args, ctor) {
|
4383 | ctor.prototype = func.prototype;
|
4384 | var child = new ctor, result = func.apply(child, args);
|
4385 | return Object(result) === result ? result : child;
|
4386 | })(Gt, [{}].concat(slice.call(args)), function(){});
|
4387 | };
|
4388 |
|
4389 | rethinkdb.ge = function() {
|
4390 | var args;
|
4391 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4392 | return (function(func, args, ctor) {
|
4393 | ctor.prototype = func.prototype;
|
4394 | var child = new ctor, result = func.apply(child, args);
|
4395 | return Object(result) === result ? result : child;
|
4396 | })(Ge, [{}].concat(slice.call(args)), function(){});
|
4397 | };
|
4398 |
|
4399 | rethinkdb.or = function() {
|
4400 | var args;
|
4401 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4402 | return (function(func, args, ctor) {
|
4403 | ctor.prototype = func.prototype;
|
4404 | var child = new ctor, result = func.apply(child, args);
|
4405 | return Object(result) === result ? result : child;
|
4406 | })(Or, [{}].concat(slice.call(args)), function(){});
|
4407 | };
|
4408 |
|
4409 | rethinkdb.and = function() {
|
4410 | var args;
|
4411 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4412 | return (function(func, args, ctor) {
|
4413 | ctor.prototype = func.prototype;
|
4414 | var child = new ctor, result = func.apply(child, args);
|
4415 | return Object(result) === result ? result : child;
|
4416 | })(And, [{}].concat(slice.call(args)), function(){});
|
4417 | };
|
4418 |
|
4419 | rethinkdb.not = function() {
|
4420 | var args;
|
4421 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4422 | return (function(func, args, ctor) {
|
4423 | ctor.prototype = func.prototype;
|
4424 | var child = new ctor, result = func.apply(child, args);
|
4425 | return Object(result) === result ? result : child;
|
4426 | })(Not, [{}].concat(slice.call(args)), function(){});
|
4427 | };
|
4428 |
|
4429 | rethinkdb.add = function() {
|
4430 | var args;
|
4431 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4432 | return (function(func, args, ctor) {
|
4433 | ctor.prototype = func.prototype;
|
4434 | var child = new ctor, result = func.apply(child, args);
|
4435 | return Object(result) === result ? result : child;
|
4436 | })(Add, [{}].concat(slice.call(args)), function(){});
|
4437 | };
|
4438 |
|
4439 | rethinkdb.sub = function() {
|
4440 | var args;
|
4441 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4442 | return (function(func, args, ctor) {
|
4443 | ctor.prototype = func.prototype;
|
4444 | var child = new ctor, result = func.apply(child, args);
|
4445 | return Object(result) === result ? result : child;
|
4446 | })(Sub, [{}].concat(slice.call(args)), function(){});
|
4447 | };
|
4448 |
|
4449 | rethinkdb.div = function() {
|
4450 | var args;
|
4451 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4452 | return (function(func, args, ctor) {
|
4453 | ctor.prototype = func.prototype;
|
4454 | var child = new ctor, result = func.apply(child, args);
|
4455 | return Object(result) === result ? result : child;
|
4456 | })(Div, [{}].concat(slice.call(args)), function(){});
|
4457 | };
|
4458 |
|
4459 | rethinkdb.mul = function() {
|
4460 | var args;
|
4461 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4462 | return (function(func, args, ctor) {
|
4463 | ctor.prototype = func.prototype;
|
4464 | var child = new ctor, result = func.apply(child, args);
|
4465 | return Object(result) === result ? result : child;
|
4466 | })(Mul, [{}].concat(slice.call(args)), function(){});
|
4467 | };
|
4468 |
|
4469 | rethinkdb.mod = function() {
|
4470 | var args;
|
4471 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4472 | return (function(func, args, ctor) {
|
4473 | ctor.prototype = func.prototype;
|
4474 | var child = new ctor, result = func.apply(child, args);
|
4475 | return Object(result) === result ? result : child;
|
4476 | })(Mod, [{}].concat(slice.call(args)), function(){});
|
4477 | };
|
4478 |
|
4479 | rethinkdb.floor = function() {
|
4480 | var args;
|
4481 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4482 | return (function(func, args, ctor) {
|
4483 | ctor.prototype = func.prototype;
|
4484 | var child = new ctor, result = func.apply(child, args);
|
4485 | return Object(result) === result ? result : child;
|
4486 | })(Floor, [{}].concat(slice.call(args)), function(){});
|
4487 | };
|
4488 |
|
4489 | rethinkdb.ceil = function() {
|
4490 | var args;
|
4491 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4492 | return (function(func, args, ctor) {
|
4493 | ctor.prototype = func.prototype;
|
4494 | var child = new ctor, result = func.apply(child, args);
|
4495 | return Object(result) === result ? result : child;
|
4496 | })(Ceil, [{}].concat(slice.call(args)), function(){});
|
4497 | };
|
4498 |
|
4499 | rethinkdb.round = function() {
|
4500 | var args;
|
4501 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4502 | return (function(func, args, ctor) {
|
4503 | ctor.prototype = func.prototype;
|
4504 | var child = new ctor, result = func.apply(child, args);
|
4505 | return Object(result) === result ? result : child;
|
4506 | })(Round, [{}].concat(slice.call(args)), function(){});
|
4507 | };
|
4508 |
|
4509 | rethinkdb.typeOf = function() {
|
4510 | var args;
|
4511 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4512 | return (function(func, args, ctor) {
|
4513 | ctor.prototype = func.prototype;
|
4514 | var child = new ctor, result = func.apply(child, args);
|
4515 | return Object(result) === result ? result : child;
|
4516 | })(TypeOf, [{}].concat(slice.call(args)), function(){});
|
4517 | };
|
4518 |
|
4519 | rethinkdb.info = function() {
|
4520 | var args;
|
4521 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4522 | return (function(func, args, ctor) {
|
4523 | ctor.prototype = func.prototype;
|
4524 | var child = new ctor, result = func.apply(child, args);
|
4525 | return Object(result) === result ? result : child;
|
4526 | })(Info, [{}].concat(slice.call(args)), function(){});
|
4527 | };
|
4528 |
|
4529 | rethinkdb.literal = function() {
|
4530 | var args;
|
4531 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4532 | return (function(func, args, ctor) {
|
4533 | ctor.prototype = func.prototype;
|
4534 | var child = new ctor, result = func.apply(child, args);
|
4535 | return Object(result) === result ? result : child;
|
4536 | })(Literal, [{}].concat(slice.call(args)), function(){});
|
4537 | };
|
4538 |
|
4539 | rethinkdb.ISO8601 = aropt(function(str, opts) {
|
4540 | return new ISO8601(opts, str);
|
4541 | });
|
4542 |
|
4543 | rethinkdb.epochTime = function() {
|
4544 | var args;
|
4545 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4546 | return (function(func, args, ctor) {
|
4547 | ctor.prototype = func.prototype;
|
4548 | var child = new ctor, result = func.apply(child, args);
|
4549 | return Object(result) === result ? result : child;
|
4550 | })(EpochTime, [{}].concat(slice.call(args)), function(){});
|
4551 | };
|
4552 |
|
4553 | rethinkdb.now = function() {
|
4554 | var args;
|
4555 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4556 | return (function(func, args, ctor) {
|
4557 | ctor.prototype = func.prototype;
|
4558 | var child = new ctor, result = func.apply(child, args);
|
4559 | return Object(result) === result ? result : child;
|
4560 | })(Now, [{}].concat(slice.call(args)), function(){});
|
4561 | };
|
4562 |
|
4563 | rethinkdb.time = function() {
|
4564 | var args;
|
4565 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4566 | return (function(func, args, ctor) {
|
4567 | ctor.prototype = func.prototype;
|
4568 | var child = new ctor, result = func.apply(child, args);
|
4569 | return Object(result) === result ? result : child;
|
4570 | })(Time, [{}].concat(slice.call(args)), function(){});
|
4571 | };
|
4572 |
|
4573 | rethinkdb.monday = new ((function(superClass) {
|
4574 | extend(_Class, superClass);
|
4575 |
|
4576 | function _Class() {
|
4577 | return _Class.__super__.constructor.apply(this, arguments);
|
4578 | }
|
4579 |
|
4580 | _Class.prototype.tt = protoTermType.MONDAY;
|
4581 |
|
4582 | _Class.prototype.st = 'monday';
|
4583 |
|
4584 | return _Class;
|
4585 |
|
4586 | })(RDBConstant))();
|
4587 |
|
4588 | rethinkdb.tuesday = new ((function(superClass) {
|
4589 | extend(_Class, superClass);
|
4590 |
|
4591 | function _Class() {
|
4592 | return _Class.__super__.constructor.apply(this, arguments);
|
4593 | }
|
4594 |
|
4595 | _Class.prototype.tt = protoTermType.TUESDAY;
|
4596 |
|
4597 | _Class.prototype.st = 'tuesday';
|
4598 |
|
4599 | return _Class;
|
4600 |
|
4601 | })(RDBConstant))();
|
4602 |
|
4603 | rethinkdb.wednesday = new ((function(superClass) {
|
4604 | extend(_Class, superClass);
|
4605 |
|
4606 | function _Class() {
|
4607 | return _Class.__super__.constructor.apply(this, arguments);
|
4608 | }
|
4609 |
|
4610 | _Class.prototype.tt = protoTermType.WEDNESDAY;
|
4611 |
|
4612 | _Class.prototype.st = 'wednesday';
|
4613 |
|
4614 | return _Class;
|
4615 |
|
4616 | })(RDBConstant))();
|
4617 |
|
4618 | rethinkdb.thursday = new ((function(superClass) {
|
4619 | extend(_Class, superClass);
|
4620 |
|
4621 | function _Class() {
|
4622 | return _Class.__super__.constructor.apply(this, arguments);
|
4623 | }
|
4624 |
|
4625 | _Class.prototype.tt = protoTermType.THURSDAY;
|
4626 |
|
4627 | _Class.prototype.st = 'thursday';
|
4628 |
|
4629 | return _Class;
|
4630 |
|
4631 | })(RDBConstant))();
|
4632 |
|
4633 | rethinkdb.friday = new ((function(superClass) {
|
4634 | extend(_Class, superClass);
|
4635 |
|
4636 | function _Class() {
|
4637 | return _Class.__super__.constructor.apply(this, arguments);
|
4638 | }
|
4639 |
|
4640 | _Class.prototype.tt = protoTermType.FRIDAY;
|
4641 |
|
4642 | _Class.prototype.st = 'friday';
|
4643 |
|
4644 | return _Class;
|
4645 |
|
4646 | })(RDBConstant))();
|
4647 |
|
4648 | rethinkdb.saturday = new ((function(superClass) {
|
4649 | extend(_Class, superClass);
|
4650 |
|
4651 | function _Class() {
|
4652 | return _Class.__super__.constructor.apply(this, arguments);
|
4653 | }
|
4654 |
|
4655 | _Class.prototype.tt = protoTermType.SATURDAY;
|
4656 |
|
4657 | _Class.prototype.st = 'saturday';
|
4658 |
|
4659 | return _Class;
|
4660 |
|
4661 | })(RDBConstant))();
|
4662 |
|
4663 | rethinkdb.sunday = new ((function(superClass) {
|
4664 | extend(_Class, superClass);
|
4665 |
|
4666 | function _Class() {
|
4667 | return _Class.__super__.constructor.apply(this, arguments);
|
4668 | }
|
4669 |
|
4670 | _Class.prototype.tt = protoTermType.SUNDAY;
|
4671 |
|
4672 | _Class.prototype.st = 'sunday';
|
4673 |
|
4674 | return _Class;
|
4675 |
|
4676 | })(RDBConstant))();
|
4677 |
|
4678 | rethinkdb.january = new ((function(superClass) {
|
4679 | extend(_Class, superClass);
|
4680 |
|
4681 | function _Class() {
|
4682 | return _Class.__super__.constructor.apply(this, arguments);
|
4683 | }
|
4684 |
|
4685 | _Class.prototype.tt = protoTermType.JANUARY;
|
4686 |
|
4687 | _Class.prototype.st = 'january';
|
4688 |
|
4689 | return _Class;
|
4690 |
|
4691 | })(RDBConstant))();
|
4692 |
|
4693 | rethinkdb.february = new ((function(superClass) {
|
4694 | extend(_Class, superClass);
|
4695 |
|
4696 | function _Class() {
|
4697 | return _Class.__super__.constructor.apply(this, arguments);
|
4698 | }
|
4699 |
|
4700 | _Class.prototype.tt = protoTermType.FEBRUARY;
|
4701 |
|
4702 | _Class.prototype.st = 'february';
|
4703 |
|
4704 | return _Class;
|
4705 |
|
4706 | })(RDBConstant))();
|
4707 |
|
4708 | rethinkdb.march = new ((function(superClass) {
|
4709 | extend(_Class, superClass);
|
4710 |
|
4711 | function _Class() {
|
4712 | return _Class.__super__.constructor.apply(this, arguments);
|
4713 | }
|
4714 |
|
4715 | _Class.prototype.tt = protoTermType.MARCH;
|
4716 |
|
4717 | _Class.prototype.st = 'march';
|
4718 |
|
4719 | return _Class;
|
4720 |
|
4721 | })(RDBConstant))();
|
4722 |
|
4723 | rethinkdb.april = new ((function(superClass) {
|
4724 | extend(_Class, superClass);
|
4725 |
|
4726 | function _Class() {
|
4727 | return _Class.__super__.constructor.apply(this, arguments);
|
4728 | }
|
4729 |
|
4730 | _Class.prototype.tt = protoTermType.APRIL;
|
4731 |
|
4732 | _Class.prototype.st = 'april';
|
4733 |
|
4734 | return _Class;
|
4735 |
|
4736 | })(RDBConstant))();
|
4737 |
|
4738 | rethinkdb.may = new ((function(superClass) {
|
4739 | extend(_Class, superClass);
|
4740 |
|
4741 | function _Class() {
|
4742 | return _Class.__super__.constructor.apply(this, arguments);
|
4743 | }
|
4744 |
|
4745 | _Class.prototype.tt = protoTermType.MAY;
|
4746 |
|
4747 | _Class.prototype.st = 'may';
|
4748 |
|
4749 | return _Class;
|
4750 |
|
4751 | })(RDBConstant))();
|
4752 |
|
4753 | rethinkdb.june = new ((function(superClass) {
|
4754 | extend(_Class, superClass);
|
4755 |
|
4756 | function _Class() {
|
4757 | return _Class.__super__.constructor.apply(this, arguments);
|
4758 | }
|
4759 |
|
4760 | _Class.prototype.tt = protoTermType.JUNE;
|
4761 |
|
4762 | _Class.prototype.st = 'june';
|
4763 |
|
4764 | return _Class;
|
4765 |
|
4766 | })(RDBConstant))();
|
4767 |
|
4768 | rethinkdb.july = new ((function(superClass) {
|
4769 | extend(_Class, superClass);
|
4770 |
|
4771 | function _Class() {
|
4772 | return _Class.__super__.constructor.apply(this, arguments);
|
4773 | }
|
4774 |
|
4775 | _Class.prototype.tt = protoTermType.JULY;
|
4776 |
|
4777 | _Class.prototype.st = 'july';
|
4778 |
|
4779 | return _Class;
|
4780 |
|
4781 | })(RDBConstant))();
|
4782 |
|
4783 | rethinkdb.august = new ((function(superClass) {
|
4784 | extend(_Class, superClass);
|
4785 |
|
4786 | function _Class() {
|
4787 | return _Class.__super__.constructor.apply(this, arguments);
|
4788 | }
|
4789 |
|
4790 | _Class.prototype.tt = protoTermType.AUGUST;
|
4791 |
|
4792 | _Class.prototype.st = 'august';
|
4793 |
|
4794 | return _Class;
|
4795 |
|
4796 | })(RDBConstant))();
|
4797 |
|
4798 | rethinkdb.september = new ((function(superClass) {
|
4799 | extend(_Class, superClass);
|
4800 |
|
4801 | function _Class() {
|
4802 | return _Class.__super__.constructor.apply(this, arguments);
|
4803 | }
|
4804 |
|
4805 | _Class.prototype.tt = protoTermType.SEPTEMBER;
|
4806 |
|
4807 | _Class.prototype.st = 'september';
|
4808 |
|
4809 | return _Class;
|
4810 |
|
4811 | })(RDBConstant))();
|
4812 |
|
4813 | rethinkdb.october = new ((function(superClass) {
|
4814 | extend(_Class, superClass);
|
4815 |
|
4816 | function _Class() {
|
4817 | return _Class.__super__.constructor.apply(this, arguments);
|
4818 | }
|
4819 |
|
4820 | _Class.prototype.tt = protoTermType.OCTOBER;
|
4821 |
|
4822 | _Class.prototype.st = 'october';
|
4823 |
|
4824 | return _Class;
|
4825 |
|
4826 | })(RDBConstant))();
|
4827 |
|
4828 | rethinkdb.november = new ((function(superClass) {
|
4829 | extend(_Class, superClass);
|
4830 |
|
4831 | function _Class() {
|
4832 | return _Class.__super__.constructor.apply(this, arguments);
|
4833 | }
|
4834 |
|
4835 | _Class.prototype.tt = protoTermType.NOVEMBER;
|
4836 |
|
4837 | _Class.prototype.st = 'november';
|
4838 |
|
4839 | return _Class;
|
4840 |
|
4841 | })(RDBConstant))();
|
4842 |
|
4843 | rethinkdb.december = new ((function(superClass) {
|
4844 | extend(_Class, superClass);
|
4845 |
|
4846 | function _Class() {
|
4847 | return _Class.__super__.constructor.apply(this, arguments);
|
4848 | }
|
4849 |
|
4850 | _Class.prototype.tt = protoTermType.DECEMBER;
|
4851 |
|
4852 | _Class.prototype.st = 'december';
|
4853 |
|
4854 | return _Class;
|
4855 |
|
4856 | })(RDBConstant))();
|
4857 |
|
4858 | rethinkdb.minval = new ((function(superClass) {
|
4859 | extend(_Class, superClass);
|
4860 |
|
4861 | function _Class() {
|
4862 | return _Class.__super__.constructor.apply(this, arguments);
|
4863 | }
|
4864 |
|
4865 | _Class.prototype.tt = protoTermType.MINVAL;
|
4866 |
|
4867 | _Class.prototype.st = 'minval';
|
4868 |
|
4869 | return _Class;
|
4870 |
|
4871 | })(RDBConstant))();
|
4872 |
|
4873 | rethinkdb.maxval = new ((function(superClass) {
|
4874 | extend(_Class, superClass);
|
4875 |
|
4876 | function _Class() {
|
4877 | return _Class.__super__.constructor.apply(this, arguments);
|
4878 | }
|
4879 |
|
4880 | _Class.prototype.tt = protoTermType.MAXVAL;
|
4881 |
|
4882 | _Class.prototype.st = 'maxval';
|
4883 |
|
4884 | return _Class;
|
4885 |
|
4886 | })(RDBConstant))();
|
4887 |
|
4888 | rethinkdb.object = function() {
|
4889 | var args;
|
4890 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4891 | return (function(func, args, ctor) {
|
4892 | ctor.prototype = func.prototype;
|
4893 | var child = new ctor, result = func.apply(child, args);
|
4894 | return Object(result) === result ? result : child;
|
4895 | })(Object_, [{}].concat(slice.call(args)), function(){});
|
4896 | };
|
4897 |
|
4898 | rethinkdb.args = function() {
|
4899 | var args;
|
4900 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4901 | return (function(func, args, ctor) {
|
4902 | ctor.prototype = func.prototype;
|
4903 | var child = new ctor, result = func.apply(child, args);
|
4904 | return Object(result) === result ? result : child;
|
4905 | })(Args, [{}].concat(slice.call(args)), function(){});
|
4906 | };
|
4907 |
|
4908 | rethinkdb.geojson = function() {
|
4909 | var args;
|
4910 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4911 | return (function(func, args, ctor) {
|
4912 | ctor.prototype = func.prototype;
|
4913 | var child = new ctor, result = func.apply(child, args);
|
4914 | return Object(result) === result ? result : child;
|
4915 | })(Geojson, [{}].concat(slice.call(args)), function(){});
|
4916 | };
|
4917 |
|
4918 | rethinkdb.point = function() {
|
4919 | var args;
|
4920 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4921 | return (function(func, args, ctor) {
|
4922 | ctor.prototype = func.prototype;
|
4923 | var child = new ctor, result = func.apply(child, args);
|
4924 | return Object(result) === result ? result : child;
|
4925 | })(Point, [{}].concat(slice.call(args)), function(){});
|
4926 | };
|
4927 |
|
4928 | rethinkdb.line = function() {
|
4929 | var args;
|
4930 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4931 | return (function(func, args, ctor) {
|
4932 | ctor.prototype = func.prototype;
|
4933 | var child = new ctor, result = func.apply(child, args);
|
4934 | return Object(result) === result ? result : child;
|
4935 | })(Line, [{}].concat(slice.call(args)), function(){});
|
4936 | };
|
4937 |
|
4938 | rethinkdb.polygon = function() {
|
4939 | var args;
|
4940 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4941 | return (function(func, args, ctor) {
|
4942 | ctor.prototype = func.prototype;
|
4943 | var child = new ctor, result = func.apply(child, args);
|
4944 | return Object(result) === result ? result : child;
|
4945 | })(Polygon, [{}].concat(slice.call(args)), function(){});
|
4946 | };
|
4947 |
|
4948 | rethinkdb.intersects = function() {
|
4949 | var args;
|
4950 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4951 | return (function(func, args, ctor) {
|
4952 | ctor.prototype = func.prototype;
|
4953 | var child = new ctor, result = func.apply(child, args);
|
4954 | return Object(result) === result ? result : child;
|
4955 | })(Intersects, [{}].concat(slice.call(args)), function(){});
|
4956 | };
|
4957 |
|
4958 | rethinkdb.distance = aropt(function(g1, g2, opts) {
|
4959 | return new Distance(opts, g1, g2);
|
4960 | });
|
4961 |
|
4962 | rethinkdb.circle = aropt(function(cen, rad, opts) {
|
4963 | return new Circle(opts, cen, rad);
|
4964 | });
|
4965 |
|
4966 | rethinkdb.uuid = function() {
|
4967 | var args;
|
4968 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4969 | return (function(func, args, ctor) {
|
4970 | ctor.prototype = func.prototype;
|
4971 | var child = new ctor, result = func.apply(child, args);
|
4972 | return Object(result) === result ? result : child;
|
4973 | })(UUID, [{}].concat(slice.call(args)), function(){});
|
4974 | };
|
4975 |
|
4976 | rethinkdb.range = function() {
|
4977 | var args;
|
4978 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4979 | return (function(func, args, ctor) {
|
4980 | ctor.prototype = func.prototype;
|
4981 | var child = new ctor, result = func.apply(child, args);
|
4982 | return Object(result) === result ? result : child;
|
4983 | })(Range, [{}].concat(slice.call(args)), function(){});
|
4984 | };
|
4985 |
|
4986 | rethinkdb.union = function() {
|
4987 | var args;
|
4988 | args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
4989 | return (function(func, args, ctor) {
|
4990 | ctor.prototype = func.prototype;
|
4991 | var child = new ctor, result = func.apply(child, args);
|
4992 | return Object(result) === result ? result : child;
|
4993 | })(Union, [{}].concat(slice.call(args)), function(){});
|
4994 | };
|
4995 |
|
4996 | module.exports = rethinkdb;
|