@vinctus/oql 1.3.0-alpha.4 → 1.3.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.js +46 -105
- package/main.js.map +3 -3
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -5242,30 +5242,47 @@ $c_Lcom_vinctus_oql_Mutation.prototype.bulkUpdate__sci_List__s_concurrent_Future
|
|
|
5242
5242
|
return ((k$3 + " = __data__.") + k$3);
|
|
5243
5243
|
})))));
|
|
5244
5244
|
command.append__T__scm_StringBuilder(((" SET " + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$15, "", ", ", "")) + "\n"));
|
|
5245
|
-
var this$
|
|
5245
|
+
var this$22 = $n(updates);
|
|
5246
5246
|
var f = ((x$1$3) => {
|
|
5247
5247
|
var x$1$4 = $as_T2(x$1$3);
|
|
5248
5248
|
if ((x$1$4 !== null)) {
|
|
5249
5249
|
var id = $n(x$1$4)._1__O();
|
|
5250
5250
|
var update = $as_sc_Map($n(x$1$4)._2__O());
|
|
5251
|
-
var
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5251
|
+
var values = $as_sc_Iterable($n(keys).map__F1__O(new $c_sr_AbstractFunction1_$$Lambda$70e1780b84463d18653aacefee3ab989ac625f28(((k$4) => {
|
|
5252
|
+
var k$5 = $as_T(k$4);
|
|
5253
|
+
var typ = $n($as_Lcom_vinctus_oql_Attribute($n(attrsNoPK).apply__O__O(k$5))).Lcom_vinctus_oql_Attribute__f_typ;
|
|
5254
|
+
var $x_7 = $n(this.Lcom_vinctus_oql_Mutation__f_oql);
|
|
5255
|
+
var $x_6 = $n(update).apply__O__O(k$5);
|
|
5256
|
+
var x$2 = $m_Lcom_vinctus_oql_JSONType$();
|
|
5257
|
+
if (((typ !== null) && $n(typ).equals__O__Z(x$2))) {
|
|
5258
|
+
var cond = true;
|
|
5259
|
+
} else {
|
|
5260
|
+
var cond = $n(typ).isArrayType__Z();
|
|
5261
|
+
}
|
|
5262
|
+
if (cond) {
|
|
5263
|
+
var this$18 = $n(typ);
|
|
5264
|
+
var $x_5 = new $c_s_Some($as_Lcom_vinctus_oql_Datatype(this$18));
|
|
5265
|
+
} else {
|
|
5266
|
+
var $x_5 = $m_s_None$();
|
|
5267
|
+
}
|
|
5268
|
+
return $x_7.render__O__s_Option__T($x_6, $x_5);
|
|
5269
|
+
}))));
|
|
5270
|
+
var $x_9 = $n(this.Lcom_vinctus_oql_Mutation__f_oql);
|
|
5271
|
+
var this$19 = $n($n($as_Lcom_vinctus_oql_Attribute($n($n(this.Lcom_vinctus_oql_Mutation__f_entity).pk__s_Option()).get__O())).Lcom_vinctus_oql_Attribute__f_typ);
|
|
5272
|
+
var value = $as_Lcom_vinctus_oql_Datatype(this$19);
|
|
5273
|
+
var $x_8 = $x_9.render__O__s_Option__T(id, new $c_s_Some(value));
|
|
5274
|
+
var this$21 = $n(values);
|
|
5275
|
+
return (((("(" + $x_8) + ", ") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$21, "", ", ", "")) + ")");
|
|
5259
5276
|
}
|
|
5260
5277
|
throw new $c_s_MatchError(x$1$4);
|
|
5261
5278
|
});
|
|
5262
|
-
if ((this$
|
|
5263
|
-
var this$
|
|
5279
|
+
if ((this$22 === $m_sci_Nil$())) {
|
|
5280
|
+
var this$23 = $m_sci_Nil$();
|
|
5264
5281
|
} else {
|
|
5265
|
-
var x0$3 = this$
|
|
5282
|
+
var x0$3 = this$22.head__O();
|
|
5266
5283
|
var h = new $c_sci_$colon$colon(f(x0$3), $m_sci_Nil$());
|
|
5267
5284
|
var t = h;
|
|
5268
|
-
var rest = $as_sci_List(this$
|
|
5285
|
+
var rest = $as_sci_List(this$22.tail__O());
|
|
5269
5286
|
while ((rest !== $m_sci_Nil$())) {
|
|
5270
5287
|
var x0$4 = $n(rest).head__O();
|
|
5271
5288
|
var nx = new $c_sci_$colon$colon(f(x0$4), $m_sci_Nil$());
|
|
@@ -5273,16 +5290,16 @@ $c_Lcom_vinctus_oql_Mutation.prototype.bulkUpdate__sci_List__s_concurrent_Future
|
|
|
5273
5290
|
t = nx;
|
|
5274
5291
|
rest = $as_sci_List($n(rest).tail__O());
|
|
5275
5292
|
}
|
|
5276
|
-
var this$
|
|
5293
|
+
var this$23 = h;
|
|
5277
5294
|
}
|
|
5278
|
-
var $
|
|
5295
|
+
var $x_10 = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$23, "", ", ", "");
|
|
5279
5296
|
var $x_4 = $n($as_Lcom_vinctus_oql_Attribute($n($n(this.Lcom_vinctus_oql_Mutation__f_entity).pk__s_Option()).get__O())).Lcom_vinctus_oql_Attribute__f_column;
|
|
5280
|
-
var this$
|
|
5281
|
-
command.append__T__scm_StringBuilder(((((((" FROM (VALUES " + $
|
|
5297
|
+
var this$24 = $n(columns);
|
|
5298
|
+
command.append__T__scm_StringBuilder(((((((" FROM (VALUES " + $x_10) + ") AS __data__ (") + $x_4) + ", ") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$24, "", ", ", "")) + ")\n"));
|
|
5282
5299
|
command.append__T__scm_StringBuilder(((((((" WHERE " + $n(this.Lcom_vinctus_oql_Mutation__f_entity).Lcom_vinctus_oql_Entity__f_table) + ".") + $n($as_Lcom_vinctus_oql_Attribute($n($n(this.Lcom_vinctus_oql_Mutation__f_entity).pk__s_Option()).get__O())).Lcom_vinctus_oql_Attribute__f_column) + " = __data__.") + $n($as_Lcom_vinctus_oql_Attribute($n($n(this.Lcom_vinctus_oql_Mutation__f_entity).pk__s_Option()).get__O())).Lcom_vinctus_oql_Attribute__f_column) + "\n"));
|
|
5283
5300
|
$n(this.Lcom_vinctus_oql_Mutation__f_oql).show__T__V($n(command.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content);
|
|
5284
|
-
var this$
|
|
5285
|
-
return $n($n($n(this$
|
|
5301
|
+
var this$25 = $n(this.Lcom_vinctus_oql_Mutation__f_oql);
|
|
5302
|
+
return $n($n($n(this$25.Lcom_vinctus_oql_AbstractOQL__f_ds).connect__Lcom_vinctus_oql_OQLConnection()).command__T__s_concurrent_Future($n(command.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content)).map__F1__s_concurrent_ExecutionContext__s_concurrent_Future(new $c_sr_AbstractFunction1_$$Lambda$70e1780b84463d18653aacefee3ab989ac625f28(((_$10) => {
|
|
5286
5303
|
$as_Lcom_vinctus_oql_OQLResultSet(_$10);
|
|
5287
5304
|
})), this.Lcom_vinctus_oql_Mutation__f_ec);
|
|
5288
5305
|
});
|
|
@@ -23501,9 +23518,6 @@ $c_s_PartialFunction$.prototype.constructor = $c_s_PartialFunction$;
|
|
|
23501
23518
|
function $h_s_PartialFunction$() {
|
|
23502
23519
|
}
|
|
23503
23520
|
$h_s_PartialFunction$.prototype = $c_s_PartialFunction$.prototype;
|
|
23504
|
-
$c_s_PartialFunction$.prototype.scala$PartialFunction$$fallbackOccurred__O__Z = (function(x) {
|
|
23505
|
-
return (this.s_PartialFunction$__f_fallback_fn === x);
|
|
23506
|
-
});
|
|
23507
23521
|
var $d_s_PartialFunction$ = new $TypeData().initClass($c_s_PartialFunction$, "scala.PartialFunction$", ({
|
|
23508
23522
|
s_PartialFunction$: 1
|
|
23509
23523
|
}));
|
|
@@ -29315,7 +29329,7 @@ $c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.render__O__s_Option__T = (
|
|
|
29315
29329
|
var x$1 = $as_Lcom_vinctus_oql_ArrayType(x12);
|
|
29316
29330
|
$n(x$1);
|
|
29317
29331
|
if ((a === null)) {
|
|
29318
|
-
return "NULL";
|
|
29332
|
+
return ("NULL::" + $n(this.Lcom_vinctus_oql_AbstractOQL__f_ds).mapType__Lcom_vinctus_oql_TypeSpecifier__T($as_Lcom_vinctus_oql_TypeSpecifier($n(typ).get__O())));
|
|
29319
29333
|
} else {
|
|
29320
29334
|
matchResult4: {
|
|
29321
29335
|
var seq$2;
|
|
@@ -29361,6 +29375,9 @@ $c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.render__O__s_Option__T = (
|
|
|
29361
29375
|
$c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.render$default$2__s_Option = (function() {
|
|
29362
29376
|
return $m_s_None$();
|
|
29363
29377
|
});
|
|
29378
|
+
$c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.showQuery = (function() {
|
|
29379
|
+
this.showQuery__V();
|
|
29380
|
+
});
|
|
29364
29381
|
$c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.count = (function(arg, ...rest) {
|
|
29365
29382
|
var prep0 = $as_T(arg);
|
|
29366
29383
|
var prep1 = ((rest[0] === (void 0)) ? (void 0) : rest[0]);
|
|
@@ -29382,9 +29399,6 @@ $c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.entity = (function(arg) {
|
|
|
29382
29399
|
var prep0 = $as_T(arg);
|
|
29383
29400
|
return this.entity__T__Lcom_vinctus_oql_Mutation\uff3fJS\uff3fNodePG(prep0);
|
|
29384
29401
|
});
|
|
29385
|
-
$c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.showQuery = (function() {
|
|
29386
|
-
this.showQuery__V();
|
|
29387
|
-
});
|
|
29388
29402
|
$c_Lcom_vinctus_oql_OQL\uff3fNodePG\uff3fJS.prototype.raw = (function(arg, arg$2) {
|
|
29389
29403
|
var prep0 = $as_T(arg);
|
|
29390
29404
|
return this.raw__T__O__sjs_js_Promise(prep0, arg$2);
|
|
@@ -29578,7 +29592,7 @@ $c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.render__O__s_Option__T = (fun
|
|
|
29578
29592
|
var x$1 = $as_Lcom_vinctus_oql_ArrayType(x12);
|
|
29579
29593
|
$n(x$1);
|
|
29580
29594
|
if ((a === null)) {
|
|
29581
|
-
return "NULL";
|
|
29595
|
+
return ("NULL::" + $n(this.Lcom_vinctus_oql_AbstractOQL__f_ds).mapType__Lcom_vinctus_oql_TypeSpecifier__T($as_Lcom_vinctus_oql_TypeSpecifier($n(typ).get__O())));
|
|
29582
29596
|
} else {
|
|
29583
29597
|
matchResult4: {
|
|
29584
29598
|
var seq$2;
|
|
@@ -29624,8 +29638,8 @@ $c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.render__O__s_Option__T = (fun
|
|
|
29624
29638
|
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.render$default$2__s_Option = (function() {
|
|
29625
29639
|
return $m_s_None$();
|
|
29626
29640
|
});
|
|
29627
|
-
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.
|
|
29628
|
-
|
|
29641
|
+
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.showQuery = (function() {
|
|
29642
|
+
this.showQuery__V();
|
|
29629
29643
|
});
|
|
29630
29644
|
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.count = (function(arg, ...rest) {
|
|
29631
29645
|
var prep0 = $as_T(arg);
|
|
@@ -29652,13 +29666,13 @@ $c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.rawMulti = (function(arg) {
|
|
|
29652
29666
|
var prep0 = $as_T(arg);
|
|
29653
29667
|
return this.rawMulti__T__sjs_js_Promise(prep0);
|
|
29654
29668
|
});
|
|
29655
|
-
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.showQuery = (function() {
|
|
29656
|
-
this.showQuery__V();
|
|
29657
|
-
});
|
|
29658
29669
|
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.raw = (function(arg, arg$2) {
|
|
29659
29670
|
var prep0 = $as_T(arg);
|
|
29660
29671
|
return this.raw__T__O__sjs_js_Promise(prep0, arg$2);
|
|
29661
29672
|
});
|
|
29673
|
+
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.create = (function() {
|
|
29674
|
+
return this.jsCreate__sjs_js_Promise();
|
|
29675
|
+
});
|
|
29662
29676
|
$c_Lcom_vinctus_oql_OQL\uff3fRDB\uff3fJS.prototype.queryOne = (function(arg, ...rest) {
|
|
29663
29677
|
var prep0 = $as_T(arg);
|
|
29664
29678
|
var prep1 = ((rest[0] === (void 0)) ? (void 0) : rest[0]);
|
|
@@ -37705,14 +37719,6 @@ function $m_s_Option$() {
|
|
|
37705
37719
|
}
|
|
37706
37720
|
return $n_s_Option$;
|
|
37707
37721
|
}
|
|
37708
|
-
function $f_s_PartialFunction__andThen__F1__s_PartialFunction($thiz, k) {
|
|
37709
|
-
if ($is_s_PartialFunction(k)) {
|
|
37710
|
-
var x2 = $as_s_PartialFunction(k);
|
|
37711
|
-
return new $c_s_PartialFunction$Combined($thiz, x2);
|
|
37712
|
-
} else {
|
|
37713
|
-
return new $c_s_PartialFunction$AndThen($thiz, k);
|
|
37714
|
-
}
|
|
37715
|
-
}
|
|
37716
37722
|
function $f_s_PartialFunction__applyOrElse__O__F1__O($thiz, x, default$1) {
|
|
37717
37723
|
return ($thiz.isDefinedAt__O__Z(x) ? $thiz.apply__O__O(x) : $n(default$1).apply__O__O(x));
|
|
37718
37724
|
}
|
|
@@ -58062,71 +58068,6 @@ var $d_s_PartialFunction$$anon$1 = new $TypeData().initClass($c_s_PartialFunctio
|
|
|
58062
58068
|
Ljava_io_Serializable: 1
|
|
58063
58069
|
}));
|
|
58064
58070
|
/** @constructor */
|
|
58065
|
-
function $c_s_PartialFunction$AndThen(pf, k) {
|
|
58066
|
-
this.s_PartialFunction$AndThen__f_pf = null;
|
|
58067
|
-
this.s_PartialFunction$AndThen__f_k = null;
|
|
58068
|
-
this.s_PartialFunction$AndThen__f_pf = pf;
|
|
58069
|
-
this.s_PartialFunction$AndThen__f_k = k;
|
|
58070
|
-
}
|
|
58071
|
-
$c_s_PartialFunction$AndThen.prototype = new $h_O();
|
|
58072
|
-
$c_s_PartialFunction$AndThen.prototype.constructor = $c_s_PartialFunction$AndThen;
|
|
58073
|
-
/** @constructor */
|
|
58074
|
-
function $h_s_PartialFunction$AndThen() {
|
|
58075
|
-
}
|
|
58076
|
-
$h_s_PartialFunction$AndThen.prototype = $c_s_PartialFunction$AndThen.prototype;
|
|
58077
|
-
$c_s_PartialFunction$AndThen.prototype.toString__T = (function() {
|
|
58078
|
-
return "<function1>";
|
|
58079
|
-
});
|
|
58080
|
-
$c_s_PartialFunction$AndThen.prototype.isDefinedAt__O__Z = (function(x) {
|
|
58081
|
-
return $n(this.s_PartialFunction$AndThen__f_pf).isDefinedAt__O__Z(x);
|
|
58082
|
-
});
|
|
58083
|
-
$c_s_PartialFunction$AndThen.prototype.apply__O__O = (function(x) {
|
|
58084
|
-
return $n(this.s_PartialFunction$AndThen__f_k).apply__O__O($n(this.s_PartialFunction$AndThen__f_pf).apply__O__O(x));
|
|
58085
|
-
});
|
|
58086
|
-
$c_s_PartialFunction$AndThen.prototype.applyOrElse__O__F1__O = (function(x, default$1) {
|
|
58087
|
-
var z = $n(this.s_PartialFunction$AndThen__f_pf).applyOrElse__O__F1__O(x, $m_s_PartialFunction$().s_PartialFunction$__f_fallback_fn);
|
|
58088
|
-
return ((!$m_s_PartialFunction$().scala$PartialFunction$$fallbackOccurred__O__Z(z)) ? $n(this.s_PartialFunction$AndThen__f_k).apply__O__O(z) : $n(default$1).apply__O__O(x));
|
|
58089
|
-
});
|
|
58090
|
-
var $d_s_PartialFunction$AndThen = new $TypeData().initClass($c_s_PartialFunction$AndThen, "scala.PartialFunction$AndThen", ({
|
|
58091
|
-
s_PartialFunction$AndThen: 1,
|
|
58092
|
-
s_PartialFunction: 1,
|
|
58093
|
-
F1: 1,
|
|
58094
|
-
Ljava_io_Serializable: 1
|
|
58095
|
-
}));
|
|
58096
|
-
/** @constructor */
|
|
58097
|
-
function $c_s_PartialFunction$Combined(pf, k) {
|
|
58098
|
-
this.s_PartialFunction$Combined__f_pf = null;
|
|
58099
|
-
this.s_PartialFunction$Combined__f_k = null;
|
|
58100
|
-
this.s_PartialFunction$Combined__f_pf = pf;
|
|
58101
|
-
this.s_PartialFunction$Combined__f_k = k;
|
|
58102
|
-
}
|
|
58103
|
-
$c_s_PartialFunction$Combined.prototype = new $h_O();
|
|
58104
|
-
$c_s_PartialFunction$Combined.prototype.constructor = $c_s_PartialFunction$Combined;
|
|
58105
|
-
/** @constructor */
|
|
58106
|
-
function $h_s_PartialFunction$Combined() {
|
|
58107
|
-
}
|
|
58108
|
-
$h_s_PartialFunction$Combined.prototype = $c_s_PartialFunction$Combined.prototype;
|
|
58109
|
-
$c_s_PartialFunction$Combined.prototype.toString__T = (function() {
|
|
58110
|
-
return "<function1>";
|
|
58111
|
-
});
|
|
58112
|
-
$c_s_PartialFunction$Combined.prototype.isDefinedAt__O__Z = (function(x) {
|
|
58113
|
-
var b = $n(this.s_PartialFunction$Combined__f_pf).applyOrElse__O__F1__O(x, $m_s_PartialFunction$().s_PartialFunction$__f_fallback_fn);
|
|
58114
|
-
return ((!$m_s_PartialFunction$().scala$PartialFunction$$fallbackOccurred__O__Z(b)) && $n(this.s_PartialFunction$Combined__f_k).isDefinedAt__O__Z(b));
|
|
58115
|
-
});
|
|
58116
|
-
$c_s_PartialFunction$Combined.prototype.apply__O__O = (function(x) {
|
|
58117
|
-
return $n(this.s_PartialFunction$Combined__f_k).apply__O__O($n(this.s_PartialFunction$Combined__f_pf).apply__O__O(x));
|
|
58118
|
-
});
|
|
58119
|
-
$c_s_PartialFunction$Combined.prototype.applyOrElse__O__F1__O = (function(x, default$1) {
|
|
58120
|
-
var pfv = $n(this.s_PartialFunction$Combined__f_pf).applyOrElse__O__F1__O(x, $m_s_PartialFunction$().s_PartialFunction$__f_fallback_fn);
|
|
58121
|
-
return ((!$m_s_PartialFunction$().scala$PartialFunction$$fallbackOccurred__O__Z(pfv)) ? $n(this.s_PartialFunction$Combined__f_k).applyOrElse__O__F1__O(pfv, new $c_sr_AbstractFunction1_$$Lambda$70e1780b84463d18653aacefee3ab989ac625f28(((x$1$2$2) => $n(default$1).apply__O__O(x)))) : $n(default$1).apply__O__O(x));
|
|
58122
|
-
});
|
|
58123
|
-
var $d_s_PartialFunction$Combined = new $TypeData().initClass($c_s_PartialFunction$Combined, "scala.PartialFunction$Combined", ({
|
|
58124
|
-
s_PartialFunction$Combined: 1,
|
|
58125
|
-
s_PartialFunction: 1,
|
|
58126
|
-
F1: 1,
|
|
58127
|
-
Ljava_io_Serializable: 1
|
|
58128
|
-
}));
|
|
58129
|
-
/** @constructor */
|
|
58130
58071
|
function $c_sc_AbstractIterator() {
|
|
58131
58072
|
}
|
|
58132
58073
|
$c_sc_AbstractIterator.prototype = new $h_O();
|