@vinctus/oql 1.1.0-pre.18 → 1.1.0-pre.20

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.
Files changed (2) hide show
  1. package/index.js +799 -669
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2601,30 +2601,30 @@ function $p_Lcom_vinctus_oql_DataModel__scan$1__scm_ListBuffer__scm_ListBuffer__
2601
2601
  }))).withFilter__F1__sc_WithFilter(new $c_sjsr_AnonFunction1(((x$1$2) => {
2602
2602
  var x$1$3 = $as_Lcom_vinctus_oql_Attribute(x$1$2);
2603
2603
  if ((x$1$3 !== null)) {
2604
- var x250 = x$1$3.Lcom_vinctus_oql_Attribute__f_pk;
2605
- return (!x250)
2604
+ var x255 = x$1$3.Lcom_vinctus_oql_Attribute__f_pk;
2605
+ return (!x255)
2606
2606
  };
2607
2607
  throw new $c_s_MatchError(x$1$3)
2608
2608
  }))).foreach__F1__V(new $c_sjsr_AnonFunction1(((this$4, idsbuf$1$2, nullablesbuf$1$2, attrs$2, ents$2, entity$2) => ((x$1$3$1) => {
2609
2609
  var x$1$4 = $as_Lcom_vinctus_oql_Attribute(x$1$3$1);
2610
- matchResult30: {
2610
+ matchResult31: {
2611
2611
  if ((x$1$4 !== null)) {
2612
- var x259 = x$1$4.Lcom_vinctus_oql_Attribute__f_name;
2613
- var x262 = x$1$4.Lcom_vinctus_oql_Attribute__f_required;
2614
- var x263 = x$1$4.Lcom_vinctus_oql_Attribute__f_typ;
2615
- if ((x263 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
2616
- var x$1$5 = $as_Lcom_vinctus_oql_ManyToOneType(x263);
2617
- var x256 = x$1$5.Lcom_vinctus_oql_ManyToOneType__f_entity;
2612
+ var x264 = x$1$4.Lcom_vinctus_oql_Attribute__f_name;
2613
+ var x267 = x$1$4.Lcom_vinctus_oql_Attribute__f_required;
2614
+ var x268 = x$1$4.Lcom_vinctus_oql_Attribute__f_typ;
2615
+ if ((x268 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
2616
+ var x$1$5 = $as_Lcom_vinctus_oql_ManyToOneType(x268);
2617
+ var x261 = x$1$5.Lcom_vinctus_oql_ManyToOneType__f_entity;
2618
2618
  var newents = new $c_sci_$colon$colon(entity$2, ents$2);
2619
- if ((!newents.contains__O__Z(x256))) {
2620
- if ((!x262)) {
2621
- var elem$2 = new $c_sci_$colon$colon(x259, attrs$2).reverse__sci_List();
2619
+ if ((!newents.contains__O__Z(x261))) {
2620
+ if ((!x267)) {
2621
+ var elem$2 = new $c_sci_$colon$colon(x264, attrs$2).reverse__sci_List();
2622
2622
  nullablesbuf$1$2.addOne__O__scm_ListBuffer(elem$2)
2623
2623
  };
2624
- $p_Lcom_vinctus_oql_DataModel__scan$1__scm_ListBuffer__scm_ListBuffer__sci_List__sci_List__Lcom_vinctus_oql_Entity__V(this$4, idsbuf$1$2, nullablesbuf$1$2, new $c_sci_$colon$colon(x259, attrs$2), newents, x256)
2624
+ $p_Lcom_vinctus_oql_DataModel__scan$1__scm_ListBuffer__scm_ListBuffer__sci_List__sci_List__Lcom_vinctus_oql_Entity__V(this$4, idsbuf$1$2, nullablesbuf$1$2, new $c_sci_$colon$colon(x264, attrs$2), newents, x261)
2625
2625
  }
2626
2626
  };
2627
- break matchResult30
2627
+ break matchResult31
2628
2628
  };
2629
2629
  throw new $c_s_MatchError(x$1$4)
2630
2630
  }
@@ -2635,72 +2635,72 @@ function $ps_Lcom_vinctus_oql_DataModel__lookup$1__Lcom_vinctus_oql_OQLExpressio
2635
2635
  var entity$tailLocal1 = entity;
2636
2636
  var ids$tailLocal1 = ids;
2637
2637
  while (true) {
2638
- matchResult33: {
2639
- var x281 = ids$tailLocal1;
2640
- if ((x281 !== null)) {
2638
+ matchResult34: {
2639
+ var x286 = ids$tailLocal1;
2640
+ if ((x286 !== null)) {
2641
2641
  $m_s_package$();
2642
- if ((x281.lengthCompare__I__I(1) === 0)) {
2643
- var x286 = $as_Lcom_vinctus_oql_Ident($f_sc_LinearSeqOps__apply__I__O(x281, 0));
2644
- matchResult31: {
2645
- var x264 = entity$tailLocal1.attributes__sci_Map().get__O__s_Option(x286.Lcom_vinctus_oql_Ident__f_s);
2646
- if ((x264 instanceof $c_s_Some)) {
2647
- var attr = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x264).s_Some__f_value);
2642
+ if ((x286.lengthCompare__I__I(1) === 0)) {
2643
+ var x291 = $as_Lcom_vinctus_oql_Ident($f_sc_LinearSeqOps__apply__I__O(x286, 0));
2644
+ matchResult32: {
2645
+ var x269 = entity$tailLocal1.attributes__sci_Map().get__O__s_Option(x291.Lcom_vinctus_oql_Ident__f_s);
2646
+ if ((x269 instanceof $c_s_Some)) {
2647
+ var attr = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x269).s_Some__f_value);
2648
2648
  var self = entity$tailLocal1;
2649
2649
  var elem = new $c_T2(self, attr);
2650
2650
  dmrefs$1.addOne__O__scm_ListBuffer(elem);
2651
2651
  if (ref$1) {
2652
2652
  if ((!(attr.Lcom_vinctus_oql_Attribute__f_typ instanceof $c_Lcom_vinctus_oql_ManyToOneType))) {
2653
- $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(x286.Lcom_vinctus_oql_Ident__f_pos, (("attribute '" + x286.Lcom_vinctus_oql_Ident__f_s) + "' is not many-to-one"), input$1)
2653
+ $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(x291.Lcom_vinctus_oql_Ident__f_pos, (("attribute '" + x291.Lcom_vinctus_oql_Ident__f_s) + "' is not many-to-one"), input$1)
2654
2654
  };
2655
2655
  var this$6 = $as_Lcom_vinctus_oql_Attribute($as_Lcom_vinctus_oql_ManyToOneType(attr.Lcom_vinctus_oql_Attribute__f_typ).Lcom_vinctus_oql_ManyToOneType__f_entity.pk__s_Option().get__O()).Lcom_vinctus_oql_Attribute__f_typ;
2656
2656
  expr$1.Lcom_vinctus_oql_OQLExpression__f_typ = $as_Lcom_vinctus_oql_Datatype(this$6)
2657
2657
  } else {
2658
2658
  if ((!attr.Lcom_vinctus_oql_Attribute__f_typ.isDataType__Z())) {
2659
- $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(x286.Lcom_vinctus_oql_Ident__f_pos, (("attribute '" + x286.Lcom_vinctus_oql_Ident__f_s) + "' is not a DBMS data type"), input$1)
2659
+ $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(x291.Lcom_vinctus_oql_Ident__f_pos, (("attribute '" + x291.Lcom_vinctus_oql_Ident__f_s) + "' is not a DBMS data type"), input$1)
2660
2660
  };
2661
2661
  var this$7 = attr.Lcom_vinctus_oql_Attribute__f_typ;
2662
2662
  expr$1.Lcom_vinctus_oql_OQLExpression__f_typ = $as_Lcom_vinctus_oql_Datatype(this$7)
2663
2663
  };
2664
- break matchResult31
2664
+ break matchResult32
2665
2665
  };
2666
2666
  var x = $m_s_None$();
2667
- if ((x === x264)) {
2668
- $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(x286.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entity$tailLocal1.Lcom_vinctus_oql_Entity__f_name) + "' does not have attribute '") + x286.Lcom_vinctus_oql_Ident__f_s) + "'"), input$1)
2667
+ if ((x === x269)) {
2668
+ $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(x291.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entity$tailLocal1.Lcom_vinctus_oql_Entity__f_name) + "' does not have attribute '") + x291.Lcom_vinctus_oql_Ident__f_s) + "'"), input$1)
2669
2669
  };
2670
- throw new $c_s_MatchError(x264)
2670
+ throw new $c_s_MatchError(x269)
2671
2671
  };
2672
- break matchResult33
2672
+ break matchResult34
2673
2673
  }
2674
2674
  };
2675
- if ((x281 instanceof $c_sci_$colon$colon)) {
2676
- var x282 = $as_sci_$colon$colon(x281);
2677
- var x284 = x282.sci_$colon$colon__f_next;
2678
- var head = $as_Lcom_vinctus_oql_Ident(x282.sci_$colon$colon__f_head);
2679
- var x267 = entity$tailLocal1.attributes__sci_Map().get__O__s_Option(head.Lcom_vinctus_oql_Ident__f_s);
2680
- if ((x267 instanceof $c_s_Some)) {
2681
- var x271 = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x267).s_Some__f_value);
2682
- if ((x271 !== null)) {
2683
- var x277 = x271.Lcom_vinctus_oql_Attribute__f_typ;
2684
- if ((x277 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
2685
- var x$1 = $as_Lcom_vinctus_oql_ManyToOneType(x277);
2686
- var x280 = x$1.Lcom_vinctus_oql_ManyToOneType__f_entity;
2687
- var elem$1 = new $c_T2(x280, x271);
2675
+ if ((x286 instanceof $c_sci_$colon$colon)) {
2676
+ var x287 = $as_sci_$colon$colon(x286);
2677
+ var x289 = x287.sci_$colon$colon__f_next;
2678
+ var head = $as_Lcom_vinctus_oql_Ident(x287.sci_$colon$colon__f_head);
2679
+ var x272 = entity$tailLocal1.attributes__sci_Map().get__O__s_Option(head.Lcom_vinctus_oql_Ident__f_s);
2680
+ if ((x272 instanceof $c_s_Some)) {
2681
+ var x276 = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x272).s_Some__f_value);
2682
+ if ((x276 !== null)) {
2683
+ var x282 = x276.Lcom_vinctus_oql_Attribute__f_typ;
2684
+ if ((x282 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
2685
+ var x$1 = $as_Lcom_vinctus_oql_ManyToOneType(x282);
2686
+ var x285 = x$1.Lcom_vinctus_oql_ManyToOneType__f_entity;
2687
+ var elem$1 = new $c_T2(x285, x276);
2688
2688
  dmrefs$1.addOne__O__scm_ListBuffer(elem$1);
2689
- ids$tailLocal1 = x284;
2690
- entity$tailLocal1 = x280;
2689
+ ids$tailLocal1 = x289;
2690
+ entity$tailLocal1 = x285;
2691
2691
  continue
2692
2692
  }
2693
2693
  };
2694
2694
  $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(head.Lcom_vinctus_oql_Ident__f_pos, (((("attribute '" + head.Lcom_vinctus_oql_Ident__f_s) + "' of entity '") + entity$tailLocal1.Lcom_vinctus_oql_Entity__f_name) + "' does not have an entity type"), input$1)
2695
2695
  };
2696
2696
  var x$3 = $m_s_None$();
2697
- if ((x$3 === x267)) {
2697
+ if ((x$3 === x272)) {
2698
2698
  $m_Lcom_vinctus_oql_package$().problem__s_util_parsing_input_Position__T__T__E(head.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entity$tailLocal1.Lcom_vinctus_oql_Entity__f_name) + "' does not have attribute '") + head.Lcom_vinctus_oql_Ident__f_s) + "'"), input$1)
2699
2699
  };
2700
- throw new $c_s_MatchError(x267);
2701
- break matchResult33
2700
+ throw new $c_s_MatchError(x272);
2701
+ break matchResult34
2702
2702
  };
2703
- throw new $c_s_MatchError(x281)
2703
+ throw new $c_s_MatchError(x286)
2704
2704
  };
2705
2705
  return (void 0)
2706
2706
  }
@@ -2712,603 +2712,623 @@ function $c_Lcom_vinctus_oql_DataModel(model, dml) {
2712
2712
  this.Lcom_vinctus_oql_DataModel__f_EntityInfo$lzy1 = null;
2713
2713
  this.Lcom_vinctus_oql_DataModel__f_first = null;
2714
2714
  this.Lcom_vinctus_oql_DataModel__f_entities = null;
2715
+ this.Lcom_vinctus_oql_DataModel__f_enums = null;
2715
2716
  this.Lcom_vinctus_oql_DataModel__f_model = model;
2716
2717
  this.Lcom_vinctus_oql_DataModel__f_dml = dml;
2717
2718
  this.Lcom_vinctus_oql_DataModel__f_EntityInfo$lzy1 = new $c_Lcom_vinctus_oql_DataModel$EntityInfo$(this);
2718
- $m_Lcom_vinctus_oql_package$().Lcom_vinctus_oql_package$__f_parsingError = false;
2719
- var enums = $ct_scm_HashMap__(new $c_scm_HashMap());
2720
- var entities = new $c_scm_LinkedHashMap();
2721
- $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__enumDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).map__F1__O(new $c_sjsr_AnonFunction1(((_$5) => {
2722
- var _$5$1 = $as_Lcom_vinctus_oql_DMLEnum(_$5);
2723
- return _$5$1.Lcom_vinctus_oql_DMLEnum__f_name
2724
- })))), "enum");
2725
- $ps_Lcom_vinctus_oql_DataModel__enumDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).foreach__F1__V(new $c_sjsr_AnonFunction1(((dml$2, enums$2) => ((e) => {
2726
- var e$1 = $as_Lcom_vinctus_oql_DMLEnum(e);
2727
- $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml$2, e$1.Lcom_vinctus_oql_DMLEnum__f_labels, "label");
2728
- var key = e$1.Lcom_vinctus_oql_DMLEnum__f_name.Lcom_vinctus_oql_Ident__f_s;
2729
- var name = e$1.Lcom_vinctus_oql_DMLEnum__f_name.Lcom_vinctus_oql_Ident__f_s;
2730
- var this$1 = e$1.Lcom_vinctus_oql_DMLEnum__f_labels;
2731
- var f = ((_$6) => {
2732
- var _$6$1 = $as_Lcom_vinctus_oql_Ident(_$6);
2733
- return _$6$1.Lcom_vinctus_oql_Ident__f_s
2734
- });
2735
- if ((this$1 === $m_sci_Nil$())) {
2736
- var labels = $m_sci_Nil$()
2737
- } else {
2738
- var arg1 = this$1.head__O();
2739
- var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
2740
- var t = h;
2741
- var rest = $as_sci_List(this$1.tail__O());
2742
- while ((rest !== $m_sci_Nil$())) {
2743
- var arg1$1 = rest.head__O();
2744
- var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
2745
- t.sci_$colon$colon__f_next = nx;
2746
- t = nx;
2747
- rest = $as_sci_List(rest.tail__O())
2719
+ matchResult27: {
2720
+ var \u03b41$___1;
2721
+ var \u03b41$___2;
2722
+ $m_Lcom_vinctus_oql_package$().Lcom_vinctus_oql_package$__f_parsingError = false;
2723
+ var enums = $ct_scm_HashMap__(new $c_scm_HashMap());
2724
+ var entities = new $c_scm_LinkedHashMap();
2725
+ $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__enumDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).map__F1__O(new $c_sjsr_AnonFunction1(((_$5) => {
2726
+ var _$5$1 = $as_Lcom_vinctus_oql_DMLEnum(_$5);
2727
+ return _$5$1.Lcom_vinctus_oql_DMLEnum__f_name
2728
+ })))), "enum");
2729
+ $ps_Lcom_vinctus_oql_DataModel__enumDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).foreach__F1__V(new $c_sjsr_AnonFunction1(((dml$2, enums$2) => ((e) => {
2730
+ var e$1 = $as_Lcom_vinctus_oql_DMLEnum(e);
2731
+ $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml$2, e$1.Lcom_vinctus_oql_DMLEnum__f_labels, "label");
2732
+ var key = e$1.Lcom_vinctus_oql_DMLEnum__f_name.Lcom_vinctus_oql_Ident__f_s;
2733
+ var name = e$1.Lcom_vinctus_oql_DMLEnum__f_name.Lcom_vinctus_oql_Ident__f_s;
2734
+ var this$1 = e$1.Lcom_vinctus_oql_DMLEnum__f_labels;
2735
+ var f = ((_$6) => {
2736
+ var _$6$1 = $as_Lcom_vinctus_oql_Ident(_$6);
2737
+ return _$6$1.Lcom_vinctus_oql_Ident__f_s
2738
+ });
2739
+ if ((this$1 === $m_sci_Nil$())) {
2740
+ var labels = $m_sci_Nil$()
2741
+ } else {
2742
+ var arg1 = this$1.head__O();
2743
+ var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
2744
+ var t = h;
2745
+ var rest = $as_sci_List(this$1.tail__O());
2746
+ while ((rest !== $m_sci_Nil$())) {
2747
+ var arg1$1 = rest.head__O();
2748
+ var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
2749
+ t.sci_$colon$colon__f_next = nx;
2750
+ t = nx;
2751
+ rest = $as_sci_List(rest.tail__O())
2752
+ };
2753
+ var labels = h
2748
2754
  };
2749
- var labels = h
2750
- };
2751
- var value = new $c_Lcom_vinctus_oql_EnumType(name, labels);
2752
- $p_scm_HashMap__put0__O__O__Z__s_Some(enums$2, key, value, false)
2753
- }))(dml, enums)));
2754
- $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).map__F1__O(new $c_sjsr_AnonFunction1(((e$2) => {
2755
- var e$3 = $as_Lcom_vinctus_oql_DMLEntity(e$2);
2756
- var this$3 = e$3.Lcom_vinctus_oql_DMLEntity__f_actualName;
2757
- return $as_Lcom_vinctus_oql_Ident((this$3.isEmpty__Z() ? e$3.Lcom_vinctus_oql_DMLEntity__f_name : this$3.get__O()))
2758
- })))), "actual table");
2759
- $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).map__F1__O(new $c_sjsr_AnonFunction1(((_$7) => {
2760
- var _$7$1 = $as_Lcom_vinctus_oql_DMLEntity(_$7);
2761
- return _$7$1.Lcom_vinctus_oql_DMLEntity__f_name
2762
- })))), "entity");
2763
- $ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).foreach__F1__V(new $c_sjsr_AnonFunction1(((this$4, model$2, dml$3, entities$2) => ((entity) => {
2764
- var entity$1 = $as_Lcom_vinctus_oql_DMLEntity(entity);
2765
- $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml$3, $as_sci_Seq(entity$1.Lcom_vinctus_oql_DMLEntity__f_attributes.map__F1__O(new $c_sjsr_AnonFunction1(((a) => {
2766
- var a$1 = $as_Lcom_vinctus_oql_DMLAttribute(a);
2767
- var this$5 = a$1.Lcom_vinctus_oql_DMLAttribute__f_actualName;
2768
- return $as_Lcom_vinctus_oql_Ident((this$5.isEmpty__Z() ? a$1.Lcom_vinctus_oql_DMLAttribute__f_name : this$5.get__O()))
2769
- })))), "actual column");
2770
- $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml$3, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model$2).map__F1__O(new $c_sjsr_AnonFunction1(((_$8) => {
2771
- var _$8$1 = $as_Lcom_vinctus_oql_DMLEntity(_$8);
2772
- return _$8$1.Lcom_vinctus_oql_DMLEntity__f_name
2773
- })))), "attribute");
2774
- matchResult7: {
2775
- var x12 = $as_sci_Seq(entity$1.Lcom_vinctus_oql_DMLEntity__f_attributes.filter__F1__O(new $c_sjsr_AnonFunction1(((_$9) => {
2776
- var _$9$1 = $as_Lcom_vinctus_oql_DMLAttribute(_$9);
2777
- return _$9$1.Lcom_vinctus_oql_DMLAttribute__f_pk
2778
- }))));
2779
- if ((x12.length__I() > 1)) {
2780
- x12.foreach__F1__V(new $c_sjsr_AnonFunction1(((dml$5$2) => ((a$2) => {
2781
- var a$3 = $as_Lcom_vinctus_oql_DMLAttribute(a$2);
2782
- return $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(a$3.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_pos, "extraneous primary key", dml$5$2)
2783
- }))(dml$3)));
2784
- break matchResult7
2785
- }
2786
- };
2787
- var $$x1 = this$4.Lcom_vinctus_oql_DataModel__f_EntityInfo$lzy1;
2788
- var name$1 = entity$1.Lcom_vinctus_oql_DMLEntity__f_name.Lcom_vinctus_oql_Ident__f_s;
2789
- var this$6 = entity$1.Lcom_vinctus_oql_DMLEntity__f_actualName;
2790
- var table = $as_Lcom_vinctus_oql_Ident((this$6.isEmpty__Z() ? entity$1.Lcom_vinctus_oql_DMLEntity__f_name : this$6.get__O())).Lcom_vinctus_oql_Ident__f_s;
2791
- var info = $$x1.apply__Lcom_vinctus_oql_Entity__sci_Seq__scm_LinkedHashMap__Lcom_vinctus_oql_DataModel$EntityInfo(new $c_Lcom_vinctus_oql_Entity(name$1, table), entity$1.Lcom_vinctus_oql_DMLEntity__f_attributes, new $c_scm_LinkedHashMap());
2792
- if ((this$4.Lcom_vinctus_oql_DataModel__f_first === null)) {
2793
- this$4.Lcom_vinctus_oql_DataModel__f_first = info.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity
2794
- };
2795
- entities$2.update__O__O__V(entity$1.Lcom_vinctus_oql_DMLEntity__f_name.Lcom_vinctus_oql_Ident__f_s, info)
2796
- }))(this, model, dml, entities)));
2797
- var this$10 = new $c_sc_MapOps$$anon$1(entities);
2798
- var p = new $c_sjsr_AnonFunction1(((this$2$1) => ((x$1) => {
2799
- var x$1$1 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1);
2800
- return (x$1$1 !== null)
2801
- }))(this));
2802
- var this$41 = $ct_sc_IterableOps$WithFilter__sc_IterableOps__F1__(new $c_sc_IterableOps$WithFilter(), this$10, p);
2803
- var f$1 = new $c_sjsr_AnonFunction1(((this$3$1, dml$4, enums$3, entities$3) => ((x$1$2) => {
2804
- var x$1$3 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1$2);
2805
- matchResult15: {
2806
- if ((x$1$3 !== null)) {
2807
- var x105 = x$1$3.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2808
- var x106 = x$1$3.Lcom_vinctus_oql_DataModel$EntityInfo__f_dmlattrs;
2809
- var x107 = x$1$3.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
2810
- var elem = $m_s_None$();
2811
- var pk = new $c_sr_ObjectRef(elem);
2812
- x106.foreach__F1__V(new $c_sjsr_AnonFunction1(((this$13, dml$7$2, enums$2$2, entities$2$2, as$2, pk$2) => ((a$4) => {
2813
- var a$5 = $as_Lcom_vinctus_oql_DMLAttribute(a$4);
2814
- matchResult14: {
2815
- var $$x2;
2816
- var x59 = a$5.Lcom_vinctus_oql_DMLAttribute__f_typ;
2817
- if ((x59 instanceof $c_Lcom_vinctus_oql_DMLSimpleDataType)) {
2818
- var x$1$4 = $as_Lcom_vinctus_oql_DMLSimpleDataType(x59);
2819
- var x102 = x$1$4.Lcom_vinctus_oql_DMLSimpleDataType__f_typ;
2820
- switch (x102) {
2821
- case "text": {
2822
- var $$x2 = $m_Lcom_vinctus_oql_TextType$();
2823
- break matchResult14;
2824
- break
2825
- }
2826
- case "integer":
2827
- case "int":
2828
- case "int4": {
2829
- var $$x2 = $m_Lcom_vinctus_oql_IntegerType$();
2830
- break matchResult14;
2831
- break
2832
- }
2833
- case "bool":
2834
- case "boolean": {
2835
- var $$x2 = $m_Lcom_vinctus_oql_BooleanType$();
2836
- break matchResult14;
2837
- break
2838
- }
2839
- default: {
2840
- matchAlts3: {
2841
- matchAlts4: {
2842
- if ((x102 === "bigint")) {
2843
- break matchAlts4
2844
- };
2845
- if ((x102 === "int8")) {
2846
- break matchAlts4
2755
+ var value = new $c_Lcom_vinctus_oql_EnumType(name, labels);
2756
+ $p_scm_HashMap__put0__O__O__Z__s_Some(enums$2, key, value, false)
2757
+ }))(dml, enums)));
2758
+ $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).map__F1__O(new $c_sjsr_AnonFunction1(((e$2) => {
2759
+ var e$3 = $as_Lcom_vinctus_oql_DMLEntity(e$2);
2760
+ var this$3 = e$3.Lcom_vinctus_oql_DMLEntity__f_actualName;
2761
+ return $as_Lcom_vinctus_oql_Ident((this$3.isEmpty__Z() ? e$3.Lcom_vinctus_oql_DMLEntity__f_name : this$3.get__O()))
2762
+ })))), "actual table");
2763
+ $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).map__F1__O(new $c_sjsr_AnonFunction1(((_$7) => {
2764
+ var _$7$1 = $as_Lcom_vinctus_oql_DMLEntity(_$7);
2765
+ return _$7$1.Lcom_vinctus_oql_DMLEntity__f_name
2766
+ })))), "entity");
2767
+ $ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model).foreach__F1__V(new $c_sjsr_AnonFunction1(((this$4, model$2, dml$3, entities$2) => ((entity) => {
2768
+ var entity$1 = $as_Lcom_vinctus_oql_DMLEntity(entity);
2769
+ $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml$3, $as_sci_Seq(entity$1.Lcom_vinctus_oql_DMLEntity__f_attributes.map__F1__O(new $c_sjsr_AnonFunction1(((a) => {
2770
+ var a$1 = $as_Lcom_vinctus_oql_DMLAttribute(a);
2771
+ var this$5 = a$1.Lcom_vinctus_oql_DMLAttribute__f_actualName;
2772
+ return $as_Lcom_vinctus_oql_Ident((this$5.isEmpty__Z() ? a$1.Lcom_vinctus_oql_DMLAttribute__f_name : this$5.get__O()))
2773
+ })))), "actual column");
2774
+ $ps_Lcom_vinctus_oql_DataModel__duplicates$1__T__sci_Seq__T__V(dml$3, $as_sci_Seq($ps_Lcom_vinctus_oql_DataModel__entityDecls$1__Lcom_vinctus_oql_DMLModel__sci_Seq(model$2).map__F1__O(new $c_sjsr_AnonFunction1(((_$8) => {
2775
+ var _$8$1 = $as_Lcom_vinctus_oql_DMLEntity(_$8);
2776
+ return _$8$1.Lcom_vinctus_oql_DMLEntity__f_name
2777
+ })))), "attribute");
2778
+ matchResult7: {
2779
+ var x12 = $as_sci_Seq(entity$1.Lcom_vinctus_oql_DMLEntity__f_attributes.filter__F1__O(new $c_sjsr_AnonFunction1(((_$9) => {
2780
+ var _$9$1 = $as_Lcom_vinctus_oql_DMLAttribute(_$9);
2781
+ return _$9$1.Lcom_vinctus_oql_DMLAttribute__f_pk
2782
+ }))));
2783
+ if ((x12.length__I() > 1)) {
2784
+ x12.foreach__F1__V(new $c_sjsr_AnonFunction1(((dml$5$2) => ((a$2) => {
2785
+ var a$3 = $as_Lcom_vinctus_oql_DMLAttribute(a$2);
2786
+ return $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(a$3.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_pos, "extraneous primary key", dml$5$2)
2787
+ }))(dml$3)));
2788
+ break matchResult7
2789
+ }
2790
+ };
2791
+ var $$x1 = this$4.Lcom_vinctus_oql_DataModel__f_EntityInfo$lzy1;
2792
+ var name$1 = entity$1.Lcom_vinctus_oql_DMLEntity__f_name.Lcom_vinctus_oql_Ident__f_s;
2793
+ var this$6 = entity$1.Lcom_vinctus_oql_DMLEntity__f_actualName;
2794
+ var table = $as_Lcom_vinctus_oql_Ident((this$6.isEmpty__Z() ? entity$1.Lcom_vinctus_oql_DMLEntity__f_name : this$6.get__O())).Lcom_vinctus_oql_Ident__f_s;
2795
+ var info = $$x1.apply__Lcom_vinctus_oql_Entity__sci_Seq__scm_LinkedHashMap__Lcom_vinctus_oql_DataModel$EntityInfo(new $c_Lcom_vinctus_oql_Entity(name$1, table), entity$1.Lcom_vinctus_oql_DMLEntity__f_attributes, new $c_scm_LinkedHashMap());
2796
+ if ((this$4.Lcom_vinctus_oql_DataModel__f_first === null)) {
2797
+ this$4.Lcom_vinctus_oql_DataModel__f_first = info.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity
2798
+ };
2799
+ entities$2.update__O__O__V(entity$1.Lcom_vinctus_oql_DMLEntity__f_name.Lcom_vinctus_oql_Ident__f_s, info)
2800
+ }))(this, model, dml, entities)));
2801
+ var this$10 = new $c_sc_MapOps$$anon$1(entities);
2802
+ var p = new $c_sjsr_AnonFunction1(((this$2$1) => ((x$1) => {
2803
+ var x$1$1 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1);
2804
+ return (x$1$1 !== null)
2805
+ }))(this));
2806
+ var this$41 = $ct_sc_IterableOps$WithFilter__sc_IterableOps__F1__(new $c_sc_IterableOps$WithFilter(), this$10, p);
2807
+ var f$1 = new $c_sjsr_AnonFunction1(((this$3$1, dml$4, enums$3, entities$3) => ((x$1$2) => {
2808
+ var x$1$3 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1$2);
2809
+ matchResult15: {
2810
+ if ((x$1$3 !== null)) {
2811
+ var x105 = x$1$3.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2812
+ var x106 = x$1$3.Lcom_vinctus_oql_DataModel$EntityInfo__f_dmlattrs;
2813
+ var x107 = x$1$3.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
2814
+ var elem = $m_s_None$();
2815
+ var pk = new $c_sr_ObjectRef(elem);
2816
+ x106.foreach__F1__V(new $c_sjsr_AnonFunction1(((this$13, dml$7$2, enums$2$2, entities$2$2, as$2, pk$2) => ((a$4) => {
2817
+ var a$5 = $as_Lcom_vinctus_oql_DMLAttribute(a$4);
2818
+ matchResult14: {
2819
+ var $$x2;
2820
+ var x59 = a$5.Lcom_vinctus_oql_DMLAttribute__f_typ;
2821
+ if ((x59 instanceof $c_Lcom_vinctus_oql_DMLSimpleDataType)) {
2822
+ var x$1$4 = $as_Lcom_vinctus_oql_DMLSimpleDataType(x59);
2823
+ var x102 = x$1$4.Lcom_vinctus_oql_DMLSimpleDataType__f_typ;
2824
+ switch (x102) {
2825
+ case "text": {
2826
+ var $$x2 = $m_Lcom_vinctus_oql_TextType$();
2827
+ break matchResult14;
2828
+ break
2829
+ }
2830
+ case "integer":
2831
+ case "int":
2832
+ case "int4": {
2833
+ var $$x2 = $m_Lcom_vinctus_oql_IntegerType$();
2834
+ break matchResult14;
2835
+ break
2836
+ }
2837
+ case "bool":
2838
+ case "boolean": {
2839
+ var $$x2 = $m_Lcom_vinctus_oql_BooleanType$();
2840
+ break matchResult14;
2841
+ break
2842
+ }
2843
+ default: {
2844
+ matchAlts3: {
2845
+ matchAlts4: {
2846
+ if ((x102 === "bigint")) {
2847
+ break matchAlts4
2848
+ };
2849
+ if ((x102 === "int8")) {
2850
+ break matchAlts4
2851
+ };
2852
+ break matchAlts3
2847
2853
  };
2848
- break matchAlts3
2849
- };
2850
- var $$x2 = $m_Lcom_vinctus_oql_BigintType$();
2851
- break matchResult14
2854
+ var $$x2 = $m_Lcom_vinctus_oql_BigintType$();
2855
+ break matchResult14
2856
+ }
2852
2857
  }
2853
2858
  }
2854
- }
2855
- };
2856
- if ((x59 instanceof $c_Lcom_vinctus_oql_DMLParametricDataType)) {
2857
- var x$1$5 = $as_Lcom_vinctus_oql_DMLParametricDataType(x59);
2858
- var x89 = x$1$5.Lcom_vinctus_oql_DMLParametricDataType__f_typ;
2859
- var x90 = x$1$5.Lcom_vinctus_oql_DMLParametricDataType__f_parameters;
2860
- if ((x89 === "decimal")) {
2861
- var x = $as_T(x90.head__O());
2862
- var this$18 = $m_jl_Integer$();
2863
- var precision = this$18.parseInt__T__I__I(x, 10);
2864
- var x$2 = $as_T($as_sc_IterableOps(x90.tail__O()).head__O());
2865
- var this$21 = $m_jl_Integer$();
2866
- var scale = this$21.parseInt__T__I__I(x$2, 10);
2867
- var $$x2 = new $c_Lcom_vinctus_oql_DecimalType(precision, scale);
2868
- break matchResult14
2869
- }
2870
- };
2871
- if ((x59 instanceof $c_Lcom_vinctus_oql_DMLSimpleDataType)) {
2872
- var x$1$6 = $as_Lcom_vinctus_oql_DMLSimpleDataType(x59);
2873
- var x86 = x$1$6.Lcom_vinctus_oql_DMLSimpleDataType__f_typ;
2874
- switch (x86) {
2875
- case "float":
2876
- case "float8": {
2877
- var $$x2 = $m_Lcom_vinctus_oql_FloatType$();
2878
- break matchResult14;
2879
- break
2880
- }
2881
- case "uuid": {
2882
- var $$x2 = $m_Lcom_vinctus_oql_UUIDType$();
2883
- break matchResult14;
2884
- break
2885
- }
2886
- case "timestamp": {
2887
- var $$x2 = $m_Lcom_vinctus_oql_TimestampType$();
2888
- break matchResult14;
2889
- break
2859
+ };
2860
+ if ((x59 instanceof $c_Lcom_vinctus_oql_DMLParametricDataType)) {
2861
+ var x$1$5 = $as_Lcom_vinctus_oql_DMLParametricDataType(x59);
2862
+ var x89 = x$1$5.Lcom_vinctus_oql_DMLParametricDataType__f_typ;
2863
+ var x90 = x$1$5.Lcom_vinctus_oql_DMLParametricDataType__f_parameters;
2864
+ if ((x89 === "decimal")) {
2865
+ var x = $as_T(x90.head__O());
2866
+ var this$18 = $m_jl_Integer$();
2867
+ var precision = this$18.parseInt__T__I__I(x, 10);
2868
+ var x$2 = $as_T($as_sc_IterableOps(x90.tail__O()).head__O());
2869
+ var this$21 = $m_jl_Integer$();
2870
+ var scale = this$21.parseInt__T__I__I(x$2, 10);
2871
+ var $$x2 = new $c_Lcom_vinctus_oql_DecimalType(precision, scale);
2872
+ break matchResult14
2890
2873
  }
2891
- default: {
2892
- if ((x86 === "json")) {
2893
- var $$x2 = $m_Lcom_vinctus_oql_JSONType$();
2894
- break matchResult14
2874
+ };
2875
+ if ((x59 instanceof $c_Lcom_vinctus_oql_DMLSimpleDataType)) {
2876
+ var x$1$6 = $as_Lcom_vinctus_oql_DMLSimpleDataType(x59);
2877
+ var x86 = x$1$6.Lcom_vinctus_oql_DMLSimpleDataType__f_typ;
2878
+ switch (x86) {
2879
+ case "float":
2880
+ case "float8": {
2881
+ var $$x2 = $m_Lcom_vinctus_oql_FloatType$();
2882
+ break matchResult14;
2883
+ break
2884
+ }
2885
+ case "uuid": {
2886
+ var $$x2 = $m_Lcom_vinctus_oql_UUIDType$();
2887
+ break matchResult14;
2888
+ break
2889
+ }
2890
+ case "timestamp": {
2891
+ var $$x2 = $m_Lcom_vinctus_oql_TimestampType$();
2892
+ break matchResult14;
2893
+ break
2894
+ }
2895
+ default: {
2896
+ if ((x86 === "json")) {
2897
+ var $$x2 = $m_Lcom_vinctus_oql_JSONType$();
2898
+ break matchResult14
2899
+ }
2895
2900
  }
2896
- }
2897
- }
2898
- };
2899
- if ((x59 instanceof $c_Lcom_vinctus_oql_DMLNameType)) {
2900
- var x$1$7 = $as_Lcom_vinctus_oql_DMLNameType(x59);
2901
- var x74 = x$1$7.Lcom_vinctus_oql_DMLNameType__f_entity;
2902
- var x21 = entities$2$2.get__O__s_Option(x74.Lcom_vinctus_oql_Ident__f_s);
2903
- if ((x21 instanceof $c_s_Some)) {
2904
- var x23 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(x21).s_Some__f_value);
2905
- if ((x23 !== null)) {
2906
- var x25 = x23.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2907
- var $$x2 = new $c_Lcom_vinctus_oql_ManyToOneType(x25);
2908
- break matchResult14
2909
2901
  }
2910
2902
  };
2911
- var x$3 = $m_s_None$();
2912
- if ((x$3 === x21)) {
2913
- var x18 = enums$2$2.get__O__s_Option(x74.Lcom_vinctus_oql_Ident__f_s);
2914
- if ((x18 instanceof $c_s_Some)) {
2915
- var e$4 = $as_Lcom_vinctus_oql_EnumType($as_s_Some(x18).s_Some__f_value);
2916
- var $$x2 = e$4;
2917
- break matchResult14
2903
+ if ((x59 instanceof $c_Lcom_vinctus_oql_DMLNameType)) {
2904
+ var x$1$7 = $as_Lcom_vinctus_oql_DMLNameType(x59);
2905
+ var x74 = x$1$7.Lcom_vinctus_oql_DMLNameType__f_entity;
2906
+ var x21 = entities$2$2.get__O__s_Option(x74.Lcom_vinctus_oql_Ident__f_s);
2907
+ if ((x21 instanceof $c_s_Some)) {
2908
+ var x23 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(x21).s_Some__f_value);
2909
+ if ((x23 !== null)) {
2910
+ var x25 = x23.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2911
+ var $$x2 = new $c_Lcom_vinctus_oql_ManyToOneType(x25);
2912
+ break matchResult14
2913
+ }
2918
2914
  };
2919
- var x$3$1 = $m_s_None$();
2920
- if ((x$3$1 === x18)) {
2921
- var $$x2 = $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x74);
2922
- break matchResult14
2915
+ var x$3 = $m_s_None$();
2916
+ if ((x$3 === x21)) {
2917
+ var x18 = enums$2$2.get__O__s_Option(x74.Lcom_vinctus_oql_Ident__f_s);
2918
+ if ((x18 instanceof $c_s_Some)) {
2919
+ var e$4 = $as_Lcom_vinctus_oql_EnumType($as_s_Some(x18).s_Some__f_value);
2920
+ var $$x2 = e$4;
2921
+ break matchResult14
2922
+ };
2923
+ var x$3$1 = $m_s_None$();
2924
+ if ((x$3$1 === x18)) {
2925
+ var $$x2 = $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x74);
2926
+ break matchResult14
2927
+ };
2928
+ throw new $c_s_MatchError(x18)
2923
2929
  };
2924
- throw new $c_s_MatchError(x18)
2930
+ throw new $c_s_MatchError(x21)
2925
2931
  };
2926
- throw new $c_s_MatchError(x21)
2927
- };
2928
- if ((x59 instanceof $c_Lcom_vinctus_oql_DMLOneToOneType)) {
2929
- var x$1$8 = $as_Lcom_vinctus_oql_DMLOneToOneType(x59);
2930
- var x70 = x$1$8.Lcom_vinctus_oql_DMLOneToOneType__f_entity;
2931
- var x28 = entities$2$2.get__O__s_Option(x70.Lcom_vinctus_oql_Ident__f_s);
2932
- if ((x28 instanceof $c_s_Some)) {
2933
- var x30 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(x28).s_Some__f_value);
2934
- if ((x30 !== null)) {
2935
- var x32 = x30.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2936
- var $$x2 = new $c_Lcom_vinctus_oql_OneToOneType(x32, null);
2932
+ if ((x59 instanceof $c_Lcom_vinctus_oql_DMLOneToOneType)) {
2933
+ var x$1$8 = $as_Lcom_vinctus_oql_DMLOneToOneType(x59);
2934
+ var x70 = x$1$8.Lcom_vinctus_oql_DMLOneToOneType__f_entity;
2935
+ var x28 = entities$2$2.get__O__s_Option(x70.Lcom_vinctus_oql_Ident__f_s);
2936
+ if ((x28 instanceof $c_s_Some)) {
2937
+ var x30 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(x28).s_Some__f_value);
2938
+ if ((x30 !== null)) {
2939
+ var x32 = x30.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2940
+ var $$x2 = new $c_Lcom_vinctus_oql_OneToOneType(x32, null);
2941
+ break matchResult14
2942
+ }
2943
+ };
2944
+ var x$5 = $m_s_None$();
2945
+ if ((x$5 === x28)) {
2946
+ var $$x2 = $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x70);
2937
2947
  break matchResult14
2938
- }
2939
- };
2940
- var x$5 = $m_s_None$();
2941
- if ((x$5 === x28)) {
2942
- var $$x2 = $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x70);
2943
- break matchResult14
2948
+ };
2949
+ throw new $c_s_MatchError(x28)
2944
2950
  };
2945
- throw new $c_s_MatchError(x28)
2946
- };
2947
- if ((x59 instanceof $c_Lcom_vinctus_oql_DMLOneToManyType)) {
2948
- var x$1$9 = $as_Lcom_vinctus_oql_DMLOneToManyType(x59);
2949
- var x66 = x$1$9.Lcom_vinctus_oql_DMLOneToManyType__f_entity;
2950
- var x35 = entities$2$2.get__O__s_Option(x66.Lcom_vinctus_oql_Ident__f_s);
2951
- if ((x35 instanceof $c_s_Some)) {
2952
- var x37 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(x35).s_Some__f_value);
2953
- if ((x37 !== null)) {
2954
- var x39 = x37.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2955
- var $$x2 = new $c_Lcom_vinctus_oql_OneToManyType(x39, null);
2951
+ if ((x59 instanceof $c_Lcom_vinctus_oql_DMLOneToManyType)) {
2952
+ var x$1$9 = $as_Lcom_vinctus_oql_DMLOneToManyType(x59);
2953
+ var x66 = x$1$9.Lcom_vinctus_oql_DMLOneToManyType__f_entity;
2954
+ var x35 = entities$2$2.get__O__s_Option(x66.Lcom_vinctus_oql_Ident__f_s);
2955
+ if ((x35 instanceof $c_s_Some)) {
2956
+ var x37 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(x35).s_Some__f_value);
2957
+ if ((x37 !== null)) {
2958
+ var x39 = x37.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2959
+ var $$x2 = new $c_Lcom_vinctus_oql_OneToManyType(x39, null);
2960
+ break matchResult14
2961
+ }
2962
+ };
2963
+ var x$7 = $m_s_None$();
2964
+ if ((x$7 === x35)) {
2965
+ var $$x2 = $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x66);
2956
2966
  break matchResult14
2957
- }
2958
- };
2959
- var x$7 = $m_s_None$();
2960
- if ((x$7 === x35)) {
2961
- var $$x2 = $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x66);
2962
- break matchResult14
2967
+ };
2968
+ throw new $c_s_MatchError(x35)
2963
2969
  };
2964
- throw new $c_s_MatchError(x35)
2965
- };
2966
- if ((x59 instanceof $c_Lcom_vinctus_oql_DMLManyToManyType)) {
2967
- var x$1$10 = $as_Lcom_vinctus_oql_DMLManyToManyType(x59);
2968
- var x62 = x$1$10.Lcom_vinctus_oql_DMLManyToManyType__f_entity;
2969
- var x63 = x$1$10.Lcom_vinctus_oql_DMLManyToManyType__f_link;
2970
- var _1 = entities$2$2.get__O__s_Option(x62.Lcom_vinctus_oql_Ident__f_s);
2971
- var _2 = entities$2$2.get__O__s_Option(x63.Lcom_vinctus_oql_Ident__f_s);
2972
- if ((_1 instanceof $c_s_Some)) {
2973
- var x54 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(_1).s_Some__f_value);
2974
- if ((x54 !== null)) {
2975
- var x56 = x54.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2976
- if ((_2 instanceof $c_s_Some)) {
2977
- var x48 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(_2).s_Some__f_value);
2978
- if ((x48 !== null)) {
2979
- var x50 = x48.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2980
- var $$x2 = new $c_Lcom_vinctus_oql_ManyToManyType(x56, x50, null, null);
2981
- break matchResult14
2970
+ if ((x59 instanceof $c_Lcom_vinctus_oql_DMLManyToManyType)) {
2971
+ var x$1$10 = $as_Lcom_vinctus_oql_DMLManyToManyType(x59);
2972
+ var x62 = x$1$10.Lcom_vinctus_oql_DMLManyToManyType__f_entity;
2973
+ var x63 = x$1$10.Lcom_vinctus_oql_DMLManyToManyType__f_link;
2974
+ var _1 = entities$2$2.get__O__s_Option(x62.Lcom_vinctus_oql_Ident__f_s);
2975
+ var _2 = entities$2$2.get__O__s_Option(x63.Lcom_vinctus_oql_Ident__f_s);
2976
+ if ((_1 instanceof $c_s_Some)) {
2977
+ var x54 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(_1).s_Some__f_value);
2978
+ if ((x54 !== null)) {
2979
+ var x56 = x54.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2980
+ if ((_2 instanceof $c_s_Some)) {
2981
+ var x48 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($as_s_Some(_2).s_Some__f_value);
2982
+ if ((x48 !== null)) {
2983
+ var x50 = x48.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
2984
+ var $$x2 = new $c_Lcom_vinctus_oql_ManyToManyType(x56, x50, null, null);
2985
+ break matchResult14
2986
+ }
2982
2987
  }
2983
2988
  }
2984
- }
2989
+ };
2990
+ if (_1.isEmpty__Z()) {
2991
+ $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x62)
2992
+ };
2993
+ if (_2.isEmpty__Z()) {
2994
+ $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x63)
2995
+ };
2996
+ var $$x2 = null;
2997
+ break matchResult14
2985
2998
  };
2986
- if (_1.isEmpty__Z()) {
2987
- $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x62)
2999
+ throw new $c_s_MatchError(x59)
3000
+ };
3001
+ var typ$4 = $as_Lcom_vinctus_oql_TypeSpecifier($$x2);
3002
+ var name$2 = a$5.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3003
+ var this$38 = a$5.Lcom_vinctus_oql_DMLAttribute__f_actualName;
3004
+ var column = $as_Lcom_vinctus_oql_Ident((this$38.isEmpty__Z() ? a$5.Lcom_vinctus_oql_DMLAttribute__f_name : this$38.get__O())).Lcom_vinctus_oql_Ident__f_s;
3005
+ var pk$1 = a$5.Lcom_vinctus_oql_DMLAttribute__f_pk;
3006
+ var required = a$5.Lcom_vinctus_oql_DMLAttribute__f_required;
3007
+ var attr$3 = new $c_Lcom_vinctus_oql_Attribute(name$2, column, pk$1, required, typ$4);
3008
+ if (a$5.Lcom_vinctus_oql_DMLAttribute__f_pk) {
3009
+ if ((!typ$4.isDataType__Z())) {
3010
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N($as_Lcom_vinctus_oql_DMLEntityType(typ$4).entity__Lcom_vinctus_oql_Ident().Lcom_vinctus_oql_Ident__f_pos, "primary key must be a DBMS data type", dml$7$2)
2988
3011
  };
2989
- if (_2.isEmpty__Z()) {
2990
- $ps_Lcom_vinctus_oql_DataModel__unknownEntity$1__T__Lcom_vinctus_oql_Ident__N(dml$7$2, x63)
3012
+ if (a$5.Lcom_vinctus_oql_DMLAttribute__f_required) {
3013
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(a$5.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_pos, "primary keys are \"NOT NULL\" (required) by definition", dml$7$2)
2991
3014
  };
2992
- var $$x2 = null;
2993
- break matchResult14
2994
- };
2995
- throw new $c_s_MatchError(x59)
2996
- };
2997
- var typ$4 = $as_Lcom_vinctus_oql_TypeSpecifier($$x2);
2998
- var name$2 = a$5.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
2999
- var this$38 = a$5.Lcom_vinctus_oql_DMLAttribute__f_actualName;
3000
- var column = $as_Lcom_vinctus_oql_Ident((this$38.isEmpty__Z() ? a$5.Lcom_vinctus_oql_DMLAttribute__f_name : this$38.get__O())).Lcom_vinctus_oql_Ident__f_s;
3001
- var pk$1 = a$5.Lcom_vinctus_oql_DMLAttribute__f_pk;
3002
- var required = a$5.Lcom_vinctus_oql_DMLAttribute__f_required;
3003
- var attr$3 = new $c_Lcom_vinctus_oql_Attribute(name$2, column, pk$1, required, typ$4);
3004
- if (a$5.Lcom_vinctus_oql_DMLAttribute__f_pk) {
3005
- if ((!typ$4.isDataType__Z())) {
3006
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N($as_Lcom_vinctus_oql_DMLEntityType(typ$4).entity__Lcom_vinctus_oql_Ident().Lcom_vinctus_oql_Ident__f_pos, "primary key must be a DBMS data type", dml$7$2)
3007
- };
3008
- if (a$5.Lcom_vinctus_oql_DMLAttribute__f_required) {
3009
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(a$5.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_pos, "primary keys are \"NOT NULL\" (required) by definition", dml$7$2)
3015
+ var ev$4 = new $c_s_Some(attr$3);
3016
+ pk$2.sr_ObjectRef__f_elem = ev$4
3010
3017
  };
3011
- var ev$4 = new $c_s_Some(attr$3);
3012
- pk$2.sr_ObjectRef__f_elem = ev$4
3013
- };
3014
- as$2.update__O__O__V(a$5.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s, attr$3)
3015
- }))(this$3$1, dml$4, enums$3, entities$3, x107, pk)));
3016
- x105.Lcom_vinctus_oql_Entity__f__pk = $as_s_Option(pk.sr_ObjectRef__f_elem);
3017
- break matchResult15
3018
- };
3019
- throw new $c_s_MatchError(x$1$3)
3020
- }
3021
- }))(this, dml, enums, entities));
3022
- this$41.filtered__sc_Iterable().foreach__F1__V(f$1);
3023
- var this$43 = new $c_sc_MapOps$$anon$1(entities);
3024
- var p$1 = new $c_sjsr_AnonFunction1(((this$4$1) => ((x$1$3$1) => {
3025
- var x$1$11 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1$3$1);
3026
- return (x$1$11 !== null)
3027
- }))(this));
3028
- var this$76 = $ct_sc_IterableOps$WithFilter__sc_IterableOps__F1__(new $c_sc_IterableOps$WithFilter(), this$43, p$1);
3029
- var f$2 = new $c_sjsr_AnonFunction1(((this$5$1, dml$5, entities$4) => ((x$1$4$1) => {
3030
- var x$1$12 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1$4$1);
3031
- matchResult26: {
3032
- if ((x$1$12 !== null)) {
3033
- var x236 = x$1$12.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3034
- var x237 = x$1$12.Lcom_vinctus_oql_DataModel$EntityInfo__f_dmlattrs;
3035
- var x238 = x$1$12.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3036
- x237.foreach__F1__V(new $c_sjsr_AnonFunction1(((dml$9$2, entities$4$2, e$2$1, as$2$1) => ((x$1$2$1) => {
3037
- var x$1$13 = $as_Lcom_vinctus_oql_DMLAttribute(x$1$2$1);
3038
- matchResult25: {
3039
- if ((x$1$13 !== null)) {
3040
- var x227 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_typ;
3041
- if ((x227 instanceof $c_Lcom_vinctus_oql_DMLManyToManyType)) {
3042
- var x$1$14 = $as_Lcom_vinctus_oql_DMLManyToManyType(x227);
3043
- var x232 = x$1$14.Lcom_vinctus_oql_DMLManyToManyType__f_entity;
3044
- var x233 = x$1$14.Lcom_vinctus_oql_DMLManyToManyType__f_link;
3045
- var key$1 = x233.Lcom_vinctus_oql_Ident__f_s;
3046
- var linkinfo = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$1));
3047
- var this$47 = linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3048
- var this$50 = new $c_sc_MapOps$$anon$1(this$47);
3049
- var pred = new $c_sjsr_AnonFunction1(((e$2$2) => ((x$1$2$2) => {
3050
- var x$1$15 = $as_Lcom_vinctus_oql_Attribute(x$1$2$2);
3051
- if ((x$1$15 !== null)) {
3052
- var x119 = x$1$15.Lcom_vinctus_oql_Attribute__f_typ;
3053
- if ((x119 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3054
- var x$1$16 = $as_Lcom_vinctus_oql_ManyToOneType(x119);
3055
- var x122 = x$1$16.Lcom_vinctus_oql_ManyToOneType__f_entity;
3056
- if (((e$2$2 === null) ? (x122 === null) : e$2$2.equals__O__Z(x122))) {
3057
- return true
3018
+ as$2.update__O__O__V(a$5.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s, attr$3)
3019
+ }))(this$3$1, dml$4, enums$3, entities$3, x107, pk)));
3020
+ x105.Lcom_vinctus_oql_Entity__f__pk = $as_s_Option(pk.sr_ObjectRef__f_elem);
3021
+ break matchResult15
3022
+ };
3023
+ throw new $c_s_MatchError(x$1$3)
3024
+ }
3025
+ }))(this, dml, enums, entities));
3026
+ this$41.filtered__sc_Iterable().foreach__F1__V(f$1);
3027
+ var this$43 = new $c_sc_MapOps$$anon$1(entities);
3028
+ var p$1 = new $c_sjsr_AnonFunction1(((this$4$1) => ((x$1$3$1) => {
3029
+ var x$1$11 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1$3$1);
3030
+ return (x$1$11 !== null)
3031
+ }))(this));
3032
+ var this$76 = $ct_sc_IterableOps$WithFilter__sc_IterableOps__F1__(new $c_sc_IterableOps$WithFilter(), this$43, p$1);
3033
+ var f$2 = new $c_sjsr_AnonFunction1(((this$5$1, dml$5, entities$4) => ((x$1$4$1) => {
3034
+ var x$1$12 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(x$1$4$1);
3035
+ matchResult26: {
3036
+ if ((x$1$12 !== null)) {
3037
+ var x236 = x$1$12.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3038
+ var x237 = x$1$12.Lcom_vinctus_oql_DataModel$EntityInfo__f_dmlattrs;
3039
+ var x238 = x$1$12.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3040
+ x237.foreach__F1__V(new $c_sjsr_AnonFunction1(((dml$9$2, entities$4$2, e$2$1, as$2$1) => ((x$1$2$1) => {
3041
+ var x$1$13 = $as_Lcom_vinctus_oql_DMLAttribute(x$1$2$1);
3042
+ matchResult25: {
3043
+ if ((x$1$13 !== null)) {
3044
+ var x227 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_typ;
3045
+ if ((x227 instanceof $c_Lcom_vinctus_oql_DMLManyToManyType)) {
3046
+ var x$1$14 = $as_Lcom_vinctus_oql_DMLManyToManyType(x227);
3047
+ var x232 = x$1$14.Lcom_vinctus_oql_DMLManyToManyType__f_entity;
3048
+ var x233 = x$1$14.Lcom_vinctus_oql_DMLManyToManyType__f_link;
3049
+ var key$1 = x233.Lcom_vinctus_oql_Ident__f_s;
3050
+ var linkinfo = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$1));
3051
+ var this$47 = linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3052
+ var this$50 = new $c_sc_MapOps$$anon$1(this$47);
3053
+ var pred = new $c_sjsr_AnonFunction1(((e$2$2) => ((x$1$2$2) => {
3054
+ var x$1$15 = $as_Lcom_vinctus_oql_Attribute(x$1$2$2);
3055
+ if ((x$1$15 !== null)) {
3056
+ var x119 = x$1$15.Lcom_vinctus_oql_Attribute__f_typ;
3057
+ if ((x119 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3058
+ var x$1$16 = $as_Lcom_vinctus_oql_ManyToOneType(x119);
3059
+ var x122 = x$1$16.Lcom_vinctus_oql_ManyToOneType__f_entity;
3060
+ if (((e$2$2 === null) ? (x122 === null) : e$2$2.equals__O__Z(x122))) {
3061
+ return true
3062
+ }
3058
3063
  }
3059
- }
3064
+ };
3065
+ return false
3066
+ }))(e$2$1));
3067
+ var self = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$50, pred));
3068
+ if ((self.size__I() > 1)) {
3069
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3060
3070
  };
3061
- return false
3062
- }))(e$2$1));
3063
- var self = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$50, pred));
3064
- if ((self.size__I() > 1)) {
3065
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3066
- };
3067
- if ((self.size__I() < 1)) {
3068
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3069
- };
3070
- var key$2 = x232.Lcom_vinctus_oql_Ident__f_s;
3071
- var targetentity = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$2)).Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3072
- var this$51 = linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3073
- var this$54 = new $c_sc_MapOps$$anon$1(this$51);
3074
- var pred$1 = new $c_sjsr_AnonFunction1(((targetentity$2) => ((x$1$3$2) => {
3075
- var x$1$17 = $as_Lcom_vinctus_oql_Attribute(x$1$3$2);
3076
- if ((x$1$17 !== null)) {
3077
- var x129 = x$1$17.Lcom_vinctus_oql_Attribute__f_typ;
3078
- if ((x129 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3079
- var x$1$18 = $as_Lcom_vinctus_oql_ManyToOneType(x129);
3080
- var x132 = x$1$18.Lcom_vinctus_oql_ManyToOneType__f_entity;
3081
- if (((targetentity$2 === null) ? (x132 === null) : targetentity$2.equals__O__Z(x132))) {
3082
- return true
3071
+ if ((self.size__I() < 1)) {
3072
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3073
+ };
3074
+ var key$2 = x232.Lcom_vinctus_oql_Ident__f_s;
3075
+ var targetentity = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$2)).Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3076
+ var this$51 = linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3077
+ var this$54 = new $c_sc_MapOps$$anon$1(this$51);
3078
+ var pred$1 = new $c_sjsr_AnonFunction1(((targetentity$2) => ((x$1$3$2) => {
3079
+ var x$1$17 = $as_Lcom_vinctus_oql_Attribute(x$1$3$2);
3080
+ if ((x$1$17 !== null)) {
3081
+ var x129 = x$1$17.Lcom_vinctus_oql_Attribute__f_typ;
3082
+ if ((x129 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3083
+ var x$1$18 = $as_Lcom_vinctus_oql_ManyToOneType(x129);
3084
+ var x132 = x$1$18.Lcom_vinctus_oql_ManyToOneType__f_entity;
3085
+ if (((targetentity$2 === null) ? (x132 === null) : targetentity$2.equals__O__Z(x132))) {
3086
+ return true
3087
+ }
3083
3088
  }
3084
- }
3089
+ };
3090
+ return false
3091
+ }))(targetentity));
3092
+ var target = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$54, pred$1));
3093
+ if ((target.size__I() > 1)) {
3094
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3085
3095
  };
3086
- return false
3087
- }))(targetentity));
3088
- var target = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$54, pred$1));
3089
- if ((target.size__I() > 1)) {
3090
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3091
- };
3092
- if ((target.size__I() < 1)) {
3093
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3094
- };
3095
- var $$x3 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3096
- var key$3 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3097
- var \u03b41$ = $as_Lcom_vinctus_oql_Attribute($f_sc_MapOps__apply__O__O(as$2$1, key$3));
3098
- var link = linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3099
- var self$1 = $as_Lcom_vinctus_oql_Attribute(self.head__O());
3100
- var target$1 = $as_Lcom_vinctus_oql_Attribute(target.head__O());
3101
- var typ$1 = new $c_Lcom_vinctus_oql_ManyToManyType(targetentity, link, self$1, target$1);
3102
- var name$1$1 = \u03b41$.Lcom_vinctus_oql_Attribute__f_name;
3103
- var column$1 = \u03b41$.Lcom_vinctus_oql_Attribute__f_column;
3104
- var pk$1$1 = \u03b41$.Lcom_vinctus_oql_Attribute__f_pk;
3105
- var required$1 = \u03b41$.Lcom_vinctus_oql_Attribute__f_required;
3106
- as$2$1.update__O__O__V($$x3, new $c_Lcom_vinctus_oql_Attribute(name$1$1, column$1, pk$1$1, required$1, typ$1));
3107
- break matchResult25
3108
- };
3109
- if ((x227 instanceof $c_Lcom_vinctus_oql_DMLNameType)) {
3110
- var x$1$19 = $as_Lcom_vinctus_oql_DMLNameType(x227);
3111
- var x223 = x$1$19.Lcom_vinctus_oql_DMLNameType__f_entity;
3112
- if (entities$4$2.contains__O__Z(x223.Lcom_vinctus_oql_Ident__f_s)) {
3113
- var key$4 = x223.Lcom_vinctus_oql_Ident__f_s;
3114
- var $$x4 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$4)).Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.pk__s_Option().isEmpty__Z()
3115
- } else {
3116
- var $$x4 = false
3096
+ if ((target.size__I() < 1)) {
3097
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x233.Lcom_vinctus_oql_Ident__f_pos, (((("junction entity '" + linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x233.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3098
+ };
3099
+ var $$x3 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3100
+ var key$3 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3101
+ var \u03b42$ = $as_Lcom_vinctus_oql_Attribute($f_sc_MapOps__apply__O__O(as$2$1, key$3));
3102
+ var link = linkinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3103
+ var self$1 = $as_Lcom_vinctus_oql_Attribute(self.head__O());
3104
+ var target$1 = $as_Lcom_vinctus_oql_Attribute(target.head__O());
3105
+ var typ$1 = new $c_Lcom_vinctus_oql_ManyToManyType(targetentity, link, self$1, target$1);
3106
+ var name$1$1 = \u03b42$.Lcom_vinctus_oql_Attribute__f_name;
3107
+ var column$1 = \u03b42$.Lcom_vinctus_oql_Attribute__f_column;
3108
+ var pk$1$1 = \u03b42$.Lcom_vinctus_oql_Attribute__f_pk;
3109
+ var required$1 = \u03b42$.Lcom_vinctus_oql_Attribute__f_required;
3110
+ as$2$1.update__O__O__V($$x3, new $c_Lcom_vinctus_oql_Attribute(name$1$1, column$1, pk$1$1, required$1, typ$1));
3111
+ break matchResult25
3117
3112
  };
3118
- if ($$x4) {
3119
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x223.Lcom_vinctus_oql_Ident__f_pos, (("target entity '" + x223.Lcom_vinctus_oql_Ident__f_s) + "' has no declared primary key"), dml$9$2)
3113
+ if ((x227 instanceof $c_Lcom_vinctus_oql_DMLNameType)) {
3114
+ var x$1$19 = $as_Lcom_vinctus_oql_DMLNameType(x227);
3115
+ var x223 = x$1$19.Lcom_vinctus_oql_DMLNameType__f_entity;
3116
+ if (entities$4$2.contains__O__Z(x223.Lcom_vinctus_oql_Ident__f_s)) {
3117
+ var key$4 = x223.Lcom_vinctus_oql_Ident__f_s;
3118
+ var $$x4 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$4)).Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.pk__s_Option().isEmpty__Z()
3119
+ } else {
3120
+ var $$x4 = false
3121
+ };
3122
+ if ($$x4) {
3123
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x223.Lcom_vinctus_oql_Ident__f_pos, (("target entity '" + x223.Lcom_vinctus_oql_Ident__f_s) + "' has no declared primary key"), dml$9$2)
3124
+ };
3125
+ break matchResult25
3120
3126
  };
3121
- break matchResult25
3122
- };
3123
- if ((x227 instanceof $c_Lcom_vinctus_oql_DMLOneToOneType)) {
3124
- var x$1$20 = $as_Lcom_vinctus_oql_DMLOneToOneType(x227);
3125
- var x213 = x$1$20.Lcom_vinctus_oql_DMLOneToOneType__f_entity;
3126
- var x214 = x$1$20.Lcom_vinctus_oql_DMLOneToOneType__f_attr;
3127
- var key$5 = x213.Lcom_vinctus_oql_Ident__f_s;
3128
- var entityinfo = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$5));
3129
- matchResult21: {
3130
- var newtyp;
3131
- if ((x214 instanceof $c_s_Some)) {
3132
- var id = $as_Lcom_vinctus_oql_Ident($as_s_Some(x214).s_Some__f_value);
3133
- var x133 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs.get__O__s_Option(id.Lcom_vinctus_oql_Ident__f_s);
3134
- if ((x133 instanceof $c_s_Some)) {
3135
- var x137 = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x133).s_Some__f_value);
3136
- if ((x137 !== null)) {
3137
- var x143 = x137.Lcom_vinctus_oql_Attribute__f_typ;
3138
- if ((x143 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3139
- var x$1$21 = $as_Lcom_vinctus_oql_ManyToOneType(x143);
3140
- var x146 = x$1$21.Lcom_vinctus_oql_ManyToOneType__f_entity;
3141
- if (((e$2$1 === null) ? (x146 === null) : e$2$1.equals__O__Z(x146))) {
3142
- var entity$2 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3143
- var newtyp = new $c_Lcom_vinctus_oql_OneToOneType(entity$2, x137);
3144
- break matchResult21
3127
+ if ((x227 instanceof $c_Lcom_vinctus_oql_DMLOneToOneType)) {
3128
+ var x$1$20 = $as_Lcom_vinctus_oql_DMLOneToOneType(x227);
3129
+ var x213 = x$1$20.Lcom_vinctus_oql_DMLOneToOneType__f_entity;
3130
+ var x214 = x$1$20.Lcom_vinctus_oql_DMLOneToOneType__f_attr;
3131
+ var key$5 = x213.Lcom_vinctus_oql_Ident__f_s;
3132
+ var entityinfo = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$5));
3133
+ matchResult21: {
3134
+ var newtyp;
3135
+ if ((x214 instanceof $c_s_Some)) {
3136
+ var id = $as_Lcom_vinctus_oql_Ident($as_s_Some(x214).s_Some__f_value);
3137
+ var x133 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs.get__O__s_Option(id.Lcom_vinctus_oql_Ident__f_s);
3138
+ if ((x133 instanceof $c_s_Some)) {
3139
+ var x137 = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x133).s_Some__f_value);
3140
+ if ((x137 !== null)) {
3141
+ var x143 = x137.Lcom_vinctus_oql_Attribute__f_typ;
3142
+ if ((x143 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3143
+ var x$1$21 = $as_Lcom_vinctus_oql_ManyToOneType(x143);
3144
+ var x146 = x$1$21.Lcom_vinctus_oql_ManyToOneType__f_entity;
3145
+ if (((e$2$1 === null) ? (x146 === null) : e$2$1.equals__O__Z(x146))) {
3146
+ var entity$2 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3147
+ var newtyp = new $c_Lcom_vinctus_oql_OneToOneType(entity$2, x137);
3148
+ break matchResult21
3149
+ }
3145
3150
  }
3146
- }
3151
+ };
3152
+ var newtyp = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id.Lcom_vinctus_oql_Ident__f_pos, (((("attribute '" + id.Lcom_vinctus_oql_Ident__f_s) + "' of entity '") + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have the correct type"), dml$9$2);
3153
+ break matchResult21
3147
3154
  };
3148
- var newtyp = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id.Lcom_vinctus_oql_Ident__f_pos, (((("attribute '" + id.Lcom_vinctus_oql_Ident__f_s) + "' of entity '") + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have the correct type"), dml$9$2);
3149
- break matchResult21
3150
- };
3151
- var x$3$2 = $m_s_None$();
3152
- if ((x$3$2 === x133)) {
3153
- var newtyp = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have attribute '") + id.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2);
3154
- break matchResult21
3155
+ var x$3$2 = $m_s_None$();
3156
+ if ((x$3$2 === x133)) {
3157
+ var newtyp = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have attribute '") + id.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2);
3158
+ break matchResult21
3159
+ };
3160
+ throw new $c_s_MatchError(x133)
3155
3161
  };
3156
- throw new $c_s_MatchError(x133)
3157
- };
3158
- var x$5$1 = $m_s_None$();
3159
- if ((x$5$1 === x214)) {
3160
- var this$61 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3161
- var this$64 = new $c_sc_MapOps$$anon$1(this$61);
3162
- var pred$2 = new $c_sjsr_AnonFunction1(((e$2$3) => ((x$1$4$2) => {
3163
- var x$1$22 = $as_Lcom_vinctus_oql_Attribute(x$1$4$2);
3164
- if ((x$1$22 !== null)) {
3165
- var x153 = x$1$22.Lcom_vinctus_oql_Attribute__f_typ;
3166
- if ((x153 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3167
- var x$1$23 = $as_Lcom_vinctus_oql_ManyToOneType(x153);
3168
- var x156 = x$1$23.Lcom_vinctus_oql_ManyToOneType__f_entity;
3169
- if (((e$2$3 === null) ? (x156 === null) : e$2$3.equals__O__Z(x156))) {
3170
- return true
3162
+ var x$5$1 = $m_s_None$();
3163
+ if ((x$5$1 === x214)) {
3164
+ var this$61 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3165
+ var this$64 = new $c_sc_MapOps$$anon$1(this$61);
3166
+ var pred$2 = new $c_sjsr_AnonFunction1(((e$2$3) => ((x$1$4$2) => {
3167
+ var x$1$22 = $as_Lcom_vinctus_oql_Attribute(x$1$4$2);
3168
+ if ((x$1$22 !== null)) {
3169
+ var x153 = x$1$22.Lcom_vinctus_oql_Attribute__f_typ;
3170
+ if ((x153 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3171
+ var x$1$23 = $as_Lcom_vinctus_oql_ManyToOneType(x153);
3172
+ var x156 = x$1$23.Lcom_vinctus_oql_ManyToOneType__f_entity;
3173
+ if (((e$2$3 === null) ? (x156 === null) : e$2$3.equals__O__Z(x156))) {
3174
+ return true
3175
+ }
3171
3176
  }
3172
- }
3177
+ };
3178
+ return false
3179
+ }))(e$2$1));
3180
+ var attrs = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$64, pred$2));
3181
+ if ((attrs.size__I() > 1)) {
3182
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x213.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x213.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3173
3183
  };
3174
- return false
3175
- }))(e$2$1));
3176
- var attrs = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$64, pred$2));
3177
- if ((attrs.size__I() > 1)) {
3178
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x213.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x213.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3179
- };
3180
- if ((attrs.size__I() < 1)) {
3181
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x213.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x213.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3184
+ if ((attrs.size__I() < 1)) {
3185
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x213.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x213.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3186
+ };
3187
+ var entity$3 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3188
+ var attribute = $as_Lcom_vinctus_oql_Attribute(attrs.head__O());
3189
+ var newtyp = new $c_Lcom_vinctus_oql_OneToOneType(entity$3, attribute);
3190
+ break matchResult21
3182
3191
  };
3183
- var entity$3 = entityinfo.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3184
- var attribute = $as_Lcom_vinctus_oql_Attribute(attrs.head__O());
3185
- var newtyp = new $c_Lcom_vinctus_oql_OneToOneType(entity$3, attribute);
3186
- break matchResult21
3192
+ throw new $c_s_MatchError(x214)
3187
3193
  };
3188
- throw new $c_s_MatchError(x214)
3194
+ var $$x5 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3195
+ var key$6 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3196
+ var \u03b43$ = $as_Lcom_vinctus_oql_Attribute($f_sc_MapOps__apply__O__O(as$2$1, key$6));
3197
+ var name$3 = \u03b43$.Lcom_vinctus_oql_Attribute__f_name;
3198
+ var column$2 = \u03b43$.Lcom_vinctus_oql_Attribute__f_column;
3199
+ var pk$3 = \u03b43$.Lcom_vinctus_oql_Attribute__f_pk;
3200
+ var required$2 = \u03b43$.Lcom_vinctus_oql_Attribute__f_required;
3201
+ as$2$1.update__O__O__V($$x5, new $c_Lcom_vinctus_oql_Attribute(name$3, column$2, pk$3, required$2, newtyp));
3202
+ break matchResult25
3189
3203
  };
3190
- var $$x5 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3191
- var key$6 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3192
- var \u03b42$ = $as_Lcom_vinctus_oql_Attribute($f_sc_MapOps__apply__O__O(as$2$1, key$6));
3193
- var name$3 = \u03b42$.Lcom_vinctus_oql_Attribute__f_name;
3194
- var column$2 = \u03b42$.Lcom_vinctus_oql_Attribute__f_column;
3195
- var pk$3 = \u03b42$.Lcom_vinctus_oql_Attribute__f_pk;
3196
- var required$2 = \u03b42$.Lcom_vinctus_oql_Attribute__f_required;
3197
- as$2$1.update__O__O__V($$x5, new $c_Lcom_vinctus_oql_Attribute(name$3, column$2, pk$3, required$2, newtyp));
3198
- break matchResult25
3199
- };
3200
- if ((x227 instanceof $c_Lcom_vinctus_oql_DMLOneToManyType)) {
3201
- var x$1$24 = $as_Lcom_vinctus_oql_DMLOneToManyType(x227);
3202
- var x203 = x$1$24.Lcom_vinctus_oql_DMLOneToManyType__f_entity;
3203
- var x204 = x$1$24.Lcom_vinctus_oql_DMLOneToManyType__f_attr;
3204
- var key$7 = x203.Lcom_vinctus_oql_Ident__f_s;
3205
- var entityinfo$2 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$7));
3206
- matchResult24: {
3207
- var newtyp$2;
3208
- if ((x204 instanceof $c_s_Some)) {
3209
- var id$2 = $as_Lcom_vinctus_oql_Ident($as_s_Some(x204).s_Some__f_value);
3210
- var x160 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs.get__O__s_Option(id$2.Lcom_vinctus_oql_Ident__f_s);
3211
- if ((x160 instanceof $c_s_Some)) {
3212
- var x164 = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x160).s_Some__f_value);
3213
- if ((x164 !== null)) {
3214
- var x170 = x164.Lcom_vinctus_oql_Attribute__f_typ;
3215
- if ((x170 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3216
- var x$1$25 = $as_Lcom_vinctus_oql_ManyToOneType(x170);
3217
- var x173 = x$1$25.Lcom_vinctus_oql_ManyToOneType__f_entity;
3218
- if (((e$2$1 === null) ? (x173 === null) : e$2$1.equals__O__Z(x173))) {
3219
- var entity$4 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3220
- var newtyp$2 = new $c_Lcom_vinctus_oql_OneToManyType(entity$4, x164);
3221
- break matchResult24
3204
+ if ((x227 instanceof $c_Lcom_vinctus_oql_DMLOneToManyType)) {
3205
+ var x$1$24 = $as_Lcom_vinctus_oql_DMLOneToManyType(x227);
3206
+ var x203 = x$1$24.Lcom_vinctus_oql_DMLOneToManyType__f_entity;
3207
+ var x204 = x$1$24.Lcom_vinctus_oql_DMLOneToManyType__f_attr;
3208
+ var key$7 = x203.Lcom_vinctus_oql_Ident__f_s;
3209
+ var entityinfo$2 = $as_Lcom_vinctus_oql_DataModel$EntityInfo($f_sc_MapOps__apply__O__O(entities$4$2, key$7));
3210
+ matchResult24: {
3211
+ var newtyp$2;
3212
+ if ((x204 instanceof $c_s_Some)) {
3213
+ var id$2 = $as_Lcom_vinctus_oql_Ident($as_s_Some(x204).s_Some__f_value);
3214
+ var x160 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs.get__O__s_Option(id$2.Lcom_vinctus_oql_Ident__f_s);
3215
+ if ((x160 instanceof $c_s_Some)) {
3216
+ var x164 = $as_Lcom_vinctus_oql_Attribute($as_s_Some(x160).s_Some__f_value);
3217
+ if ((x164 !== null)) {
3218
+ var x170 = x164.Lcom_vinctus_oql_Attribute__f_typ;
3219
+ if ((x170 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3220
+ var x$1$25 = $as_Lcom_vinctus_oql_ManyToOneType(x170);
3221
+ var x173 = x$1$25.Lcom_vinctus_oql_ManyToOneType__f_entity;
3222
+ if (((e$2$1 === null) ? (x173 === null) : e$2$1.equals__O__Z(x173))) {
3223
+ var entity$4 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3224
+ var newtyp$2 = new $c_Lcom_vinctus_oql_OneToManyType(entity$4, x164);
3225
+ break matchResult24
3226
+ }
3222
3227
  }
3223
- }
3228
+ };
3229
+ var newtyp$2 = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id$2.Lcom_vinctus_oql_Ident__f_pos, (((("attribute '" + id$2.Lcom_vinctus_oql_Ident__f_s) + "' of entity '") + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have the correct type"), dml$9$2);
3230
+ break matchResult24
3224
3231
  };
3225
- var newtyp$2 = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id$2.Lcom_vinctus_oql_Ident__f_pos, (((("attribute '" + id$2.Lcom_vinctus_oql_Ident__f_s) + "' of entity '") + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have the correct type"), dml$9$2);
3226
- break matchResult24
3227
- };
3228
- var x$9 = $m_s_None$();
3229
- if ((x$9 === x160)) {
3230
- var newtyp$2 = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id$2.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have attribute '") + id$2.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2);
3231
- break matchResult24
3232
+ var x$9 = $m_s_None$();
3233
+ if ((x$9 === x160)) {
3234
+ var newtyp$2 = $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(id$2.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' does not have attribute '") + id$2.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2);
3235
+ break matchResult24
3236
+ };
3237
+ throw new $c_s_MatchError(x160)
3232
3238
  };
3233
- throw new $c_s_MatchError(x160)
3234
- };
3235
- var x$11 = $m_s_None$();
3236
- if ((x$11 === x204)) {
3237
- var this$70 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3238
- var this$73 = new $c_sc_MapOps$$anon$1(this$70);
3239
- var pred$3 = new $c_sjsr_AnonFunction1(((e$2$4) => ((x$1$5$1) => {
3240
- var x$1$26 = $as_Lcom_vinctus_oql_Attribute(x$1$5$1);
3241
- if ((x$1$26 !== null)) {
3242
- var x180 = x$1$26.Lcom_vinctus_oql_Attribute__f_typ;
3243
- if ((x180 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3244
- var x$1$27 = $as_Lcom_vinctus_oql_ManyToOneType(x180);
3245
- var x183 = x$1$27.Lcom_vinctus_oql_ManyToOneType__f_entity;
3246
- if (((e$2$4 === null) ? (x183 === null) : e$2$4.equals__O__Z(x183))) {
3247
- return true
3239
+ var x$11 = $m_s_None$();
3240
+ if ((x$11 === x204)) {
3241
+ var this$70 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_attrs;
3242
+ var this$73 = new $c_sc_MapOps$$anon$1(this$70);
3243
+ var pred$3 = new $c_sjsr_AnonFunction1(((e$2$4) => ((x$1$5$1) => {
3244
+ var x$1$26 = $as_Lcom_vinctus_oql_Attribute(x$1$5$1);
3245
+ if ((x$1$26 !== null)) {
3246
+ var x180 = x$1$26.Lcom_vinctus_oql_Attribute__f_typ;
3247
+ if ((x180 instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
3248
+ var x$1$27 = $as_Lcom_vinctus_oql_ManyToOneType(x180);
3249
+ var x183 = x$1$27.Lcom_vinctus_oql_ManyToOneType__f_entity;
3250
+ if (((e$2$4 === null) ? (x183 === null) : e$2$4.equals__O__Z(x183))) {
3251
+ return true
3252
+ }
3248
3253
  }
3249
- }
3254
+ };
3255
+ return false
3256
+ }))(e$2$1));
3257
+ var attrs$2 = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$73, pred$3));
3258
+ if ((attrs$2.size__I() > 1)) {
3259
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x203.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x203.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3250
3260
  };
3251
- return false
3252
- }))(e$2$1));
3253
- var attrs$2 = $as_sc_Iterable($f_sc_IterableOps__filter__F1__O(this$73, pred$3));
3254
- if ((attrs$2.size__I() > 1)) {
3255
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x203.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has more than one attribute of type '") + x203.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3256
- };
3257
- if ((attrs$2.size__I() < 1)) {
3258
- $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x203.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x203.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3261
+ if ((attrs$2.size__I() < 1)) {
3262
+ $m_Lcom_vinctus_oql_package$().printError__s_util_parsing_input_Position__T__T__N(x203.Lcom_vinctus_oql_Ident__f_pos, (((("entity '" + entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity.Lcom_vinctus_oql_Entity__f_name) + "' has no attributes of type '") + x203.Lcom_vinctus_oql_Ident__f_s) + "'"), dml$9$2)
3263
+ };
3264
+ var entity$5 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3265
+ var attribute$1 = $as_Lcom_vinctus_oql_Attribute(attrs$2.head__O());
3266
+ var newtyp$2 = new $c_Lcom_vinctus_oql_OneToManyType(entity$5, attribute$1);
3267
+ break matchResult24
3259
3268
  };
3260
- var entity$5 = entityinfo$2.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity;
3261
- var attribute$1 = $as_Lcom_vinctus_oql_Attribute(attrs$2.head__O());
3262
- var newtyp$2 = new $c_Lcom_vinctus_oql_OneToManyType(entity$5, attribute$1);
3263
- break matchResult24
3269
+ throw new $c_s_MatchError(x204)
3264
3270
  };
3265
- throw new $c_s_MatchError(x204)
3271
+ var $$x6 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3272
+ var key$8 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3273
+ var \u03b44$ = $as_Lcom_vinctus_oql_Attribute($f_sc_MapOps__apply__O__O(as$2$1, key$8));
3274
+ var name$4 = \u03b44$.Lcom_vinctus_oql_Attribute__f_name;
3275
+ var column$3 = \u03b44$.Lcom_vinctus_oql_Attribute__f_column;
3276
+ var pk$4 = \u03b44$.Lcom_vinctus_oql_Attribute__f_pk;
3277
+ var required$3 = \u03b44$.Lcom_vinctus_oql_Attribute__f_required;
3278
+ as$2$1.update__O__O__V($$x6, new $c_Lcom_vinctus_oql_Attribute(name$4, column$3, pk$4, required$3, newtyp$2));
3279
+ break matchResult25
3266
3280
  };
3267
- var $$x6 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3268
- var key$8 = x$1$13.Lcom_vinctus_oql_DMLAttribute__f_name.Lcom_vinctus_oql_Ident__f_s;
3269
- var \u03b43$ = $as_Lcom_vinctus_oql_Attribute($f_sc_MapOps__apply__O__O(as$2$1, key$8));
3270
- var name$4 = \u03b43$.Lcom_vinctus_oql_Attribute__f_name;
3271
- var column$3 = \u03b43$.Lcom_vinctus_oql_Attribute__f_column;
3272
- var pk$4 = \u03b43$.Lcom_vinctus_oql_Attribute__f_pk;
3273
- var required$3 = \u03b43$.Lcom_vinctus_oql_Attribute__f_required;
3274
- as$2$1.update__O__O__V($$x6, new $c_Lcom_vinctus_oql_Attribute(name$4, column$3, pk$4, required$3, newtyp$2));
3275
- break matchResult25
3281
+ if ($is_Lcom_vinctus_oql_DMLDataType(x227)) {
3282
+ break matchResult25
3283
+ }
3276
3284
  };
3277
- if ($is_Lcom_vinctus_oql_DMLDataType(x227)) {
3278
- break matchResult25
3279
- }
3280
- };
3281
- throw new $c_s_MatchError(x$1$13)
3282
- }
3283
- }))(dml$5, entities$4, x236, x238)));
3284
- var factory = $m_sci_VectorMap$();
3285
- var factory$1 = new $c_sc_MapFactory$ToFactory(factory);
3286
- x236.Lcom_vinctus_oql_Entity__f__attributes = $as_sci_Map(factory$1.fromSpecific__sc_IterableOnce__O(x238));
3287
- break matchResult26
3288
- };
3289
- throw new $c_s_MatchError(x$1$12)
3290
- }
3291
- }))(this, dml, entities));
3292
- this$76.filtered__sc_Iterable().foreach__F1__V(f$2);
3293
- if ($m_Lcom_vinctus_oql_package$().Lcom_vinctus_oql_package$__f_parsingError) {
3294
- $m_s_sys_package$().error__T__E("errors while creating data model")
3285
+ throw new $c_s_MatchError(x$1$13)
3286
+ }
3287
+ }))(dml$5, entities$4, x236, x238)));
3288
+ var factory = $m_sci_VectorMap$();
3289
+ var factory$1 = new $c_sc_MapFactory$ToFactory(factory);
3290
+ x236.Lcom_vinctus_oql_Entity__f__attributes = $as_sci_Map(factory$1.fromSpecific__sc_IterableOnce__O(x238));
3291
+ break matchResult26
3292
+ };
3293
+ throw new $c_s_MatchError(x$1$12)
3294
+ }
3295
+ }))(this, dml, entities));
3296
+ this$76.filtered__sc_Iterable().foreach__F1__V(f$2);
3297
+ if ($m_Lcom_vinctus_oql_package$().Lcom_vinctus_oql_package$__f_parsingError) {
3298
+ $m_s_sys_package$().error__T__E("errors while creating data model")
3299
+ };
3300
+ var this$77 = new $c_sc_MapView$Id(entities);
3301
+ var f$3 = new $c_sjsr_AnonFunction1(((_$10) => {
3302
+ var _$10$1 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(_$10);
3303
+ return _$10$1.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity
3304
+ }));
3305
+ var this$79 = new $c_sc_MapView$MapValues(this$77, f$3);
3306
+ var factory$2 = $m_sci_VectorMap$();
3307
+ var factory$3 = new $c_sc_MapFactory$ToFactory(factory$2);
3308
+ var _1$1 = factory$3.fromSpecific__sc_IterableOnce__O(this$79);
3309
+ $m_s_$less$colon$less$();
3310
+ var _2$1 = $m_sci_Map$().from__sc_IterableOnce__sci_Map(enums);
3311
+ var x239 = new $c_T2(_1$1, _2$1);
3312
+ var x240 = $as_sci_VectorMap(x239.T2__f__1);
3313
+ var x241 = $as_sci_Map(x239.T2__f__2);
3314
+ if ((x240 !== null)) {
3315
+ if ((x241 !== null)) {
3316
+ var \u03b41$___1 = x240;
3317
+ var \u03b41$___2 = x241;
3318
+ break matchResult27
3319
+ }
3320
+ };
3321
+ throw new $c_s_MatchError(x239)
3295
3322
  };
3296
- var this$77 = new $c_sc_MapView$Id(entities);
3297
- var f$3 = new $c_sjsr_AnonFunction1(((_$10) => {
3298
- var _$10$1 = $as_Lcom_vinctus_oql_DataModel$EntityInfo(_$10);
3299
- return _$10$1.Lcom_vinctus_oql_DataModel$EntityInfo__f_entity
3300
- }));
3301
- var this$79 = new $c_sc_MapView$MapValues(this$77, f$3);
3302
- var factory$2 = $m_sci_VectorMap$();
3303
- var factory$3 = new $c_sc_MapFactory$ToFactory(factory$2);
3304
- this.Lcom_vinctus_oql_DataModel__f_entities = $as_sci_Map(factory$3.fromSpecific__sc_IterableOnce__O(this$79));
3323
+ this.Lcom_vinctus_oql_DataModel__f_entities = $as_sci_Map(\u03b41$___1);
3324
+ this.Lcom_vinctus_oql_DataModel__f_enums = $as_sci_Map(\u03b41$___2);
3305
3325
  this.Lcom_vinctus_oql_DataModel__f_entities.values__sc_Iterable().foreach__F1__V(new $c_sjsr_AnonFunction1(((this$6$1) => ((e$3$1) => {
3306
3326
  var e$5 = $as_Lcom_vinctus_oql_Entity(e$3$1);
3307
3327
  var idsbuf = new $c_scm_ListBuffer();
3308
3328
  var nullablesbuf = new $c_scm_ListBuffer();
3309
3329
  $p_Lcom_vinctus_oql_DataModel__scan$1__scm_ListBuffer__scm_ListBuffer__sci_List__sci_List__Lcom_vinctus_oql_Entity__V(this$6$1, idsbuf, nullablesbuf, $m_s_package$().s_package$__f_Nil, $m_s_package$().s_package$__f_Nil, e$5);
3310
- var this$88 = idsbuf.toList__sci_List();
3311
- var f$8 = ((this$80, e$2$5, nullablesbuf$2) => ((ids) => {
3330
+ var this$91 = idsbuf.toList__sci_List();
3331
+ var f$8 = ((this$83, e$2$5, nullablesbuf$2) => ((ids) => {
3312
3332
  var ids$1 = $as_sci_List(ids);
3313
3333
  var f$4 = ((id$1) => {
3314
3334
  var id$3 = $as_T(id$1);
@@ -3331,13 +3351,13 @@ function $c_Lcom_vinctus_oql_DataModel(model, dml) {
3331
3351
  var attridents = h$1
3332
3352
  };
3333
3353
  var attr = new $c_Lcom_vinctus_oql_AttributeOQLExpression(attridents, null);
3334
- attr.Lcom_vinctus_oql_AttributeOQLExpression__f_dmrefs = this$80.lookup__Lcom_vinctus_oql_OQLExpression__sci_List__Z__Lcom_vinctus_oql_Entity__T__sci_List(attr, attridents, false, e$2$5, null);
3335
- var this$83 = nullablesbuf$2.toList__sci_List();
3354
+ attr.Lcom_vinctus_oql_AttributeOQLExpression__f_dmrefs = this$83.lookup__Lcom_vinctus_oql_OQLExpression__sci_List__Z__Lcom_vinctus_oql_Entity__T__sci_List(attr, attridents, false, e$2$5, null);
3355
+ var this$86 = nullablesbuf$2.toList__sci_List();
3336
3356
  var f$5 = ((ids$2) => ((_$11) => {
3337
3357
  var _$11$1 = $as_sci_List(_$11);
3338
3358
  return $f_sc_SeqOps__startsWith__sc_IterableOnce__I__Z(ids$2, _$11$1, 0)
3339
3359
  }))(ids$1);
3340
- var l = this$83;
3360
+ var l = this$86;
3341
3361
  block: {
3342
3362
  var result;
3343
3363
  while (true) {
@@ -3400,7 +3420,7 @@ function $c_Lcom_vinctus_oql_DataModel(model, dml) {
3400
3420
  }
3401
3421
  }
3402
3422
  };
3403
- var f$7 = ((this$84, e$6$2) => ((ids$3) => {
3423
+ var f$7 = ((this$87, e$6$2) => ((ids$3) => {
3404
3424
  var ids$4 = $as_sci_List(ids$3);
3405
3425
  var f$6 = ((id$4) => {
3406
3426
  var id$5 = $as_T(id$4);
@@ -3423,9 +3443,9 @@ function $c_Lcom_vinctus_oql_DataModel(model, dml) {
3423
3443
  var nullidents = h$3
3424
3444
  };
3425
3445
  var nullable = new $c_Lcom_vinctus_oql_ReferenceOQLExpression(nullidents, null);
3426
- nullable.Lcom_vinctus_oql_ReferenceOQLExpression__f_dmrefs = this$84.lookup__Lcom_vinctus_oql_OQLExpression__sci_List__Z__Lcom_vinctus_oql_Entity__T__sci_List(nullable, nullidents, true, e$6$2, null);
3446
+ nullable.Lcom_vinctus_oql_ReferenceOQLExpression__f_dmrefs = this$87.lookup__Lcom_vinctus_oql_OQLExpression__sci_List__Z__Lcom_vinctus_oql_Entity__T__sci_List(nullable, nullidents, true, e$6$2, null);
3427
3447
  return nullable
3428
- }))(this$80, e$2$5);
3448
+ }))(this$83, e$2$5);
3429
3449
  if ((result === $m_sci_Nil$())) {
3430
3450
  var nullables = $m_sci_Nil$()
3431
3451
  } else {
@@ -3444,13 +3464,13 @@ function $c_Lcom_vinctus_oql_DataModel(model, dml) {
3444
3464
  };
3445
3465
  return new $c_T2(attr, nullables)
3446
3466
  }))(this$6$1, e$5, nullablesbuf);
3447
- if ((this$88 === $m_sci_Nil$())) {
3467
+ if ((this$91 === $m_sci_Nil$())) {
3448
3468
  var attrs$1 = $m_sci_Nil$()
3449
3469
  } else {
3450
- var arg1$8 = this$88.head__O();
3470
+ var arg1$8 = this$91.head__O();
3451
3471
  var h$5 = new $c_sci_$colon$colon(f$8(arg1$8), $m_sci_Nil$());
3452
3472
  var t$5 = h$5;
3453
- var rest$4 = $as_sci_List(this$88.tail__O());
3473
+ var rest$4 = $as_sci_List(this$91.tail__O());
3454
3474
  while ((rest$4 !== $m_sci_Nil$())) {
3455
3475
  var arg1$9 = rest$4.head__O();
3456
3476
  var nx$4 = new $c_sci_$colon$colon(f$8(arg1$9), $m_sci_Nil$());
@@ -3460,11 +3480,11 @@ function $c_Lcom_vinctus_oql_DataModel(model, dml) {
3460
3480
  };
3461
3481
  var attrs$1 = h$5
3462
3482
  };
3463
- var this$91 = $m_s_Predef$().s_Predef$__f_Map;
3483
+ var this$94 = $m_s_Predef$().s_Predef$__f_Map;
3464
3484
  var $$x7 = $m_sr_ScalaRunTime$();
3465
3485
  var self$2 = this$6$1.Lcom_vinctus_oql_DataModel__f_first;
3466
3486
  var elems = $$x7.wrapRefArray__AO__sci_ArraySeq(new ($d_T2.getArrayOf().constr)([new $c_T2(self$2, attrs$1)]));
3467
- e$5.Lcom_vinctus_oql_Entity__f__fixing = this$91.from__sc_IterableOnce__sci_Map(elems)
3487
+ e$5.Lcom_vinctus_oql_Entity__f__fixing = this$94.from__sc_IterableOnce__sci_Map(elems)
3468
3488
  }))(this)))
3469
3489
  }
3470
3490
  $c_Lcom_vinctus_oql_DataModel.prototype = new $h_O();
@@ -4889,44 +4909,44 @@ $h_Lcom_vinctus_oql_RDBResultSet$package$.prototype = $c_Lcom_vinctus_oql_RDBRes
4889
4909
  $c_Lcom_vinctus_oql_RDBResultSet$package$.prototype.unpack__Lio_github_edadma_rdb_Value__O = (function(v) {
4890
4910
  if ((v instanceof $c_Lio_github_edadma_rdb_NumberValue)) {
4891
4911
  var x$1 = $as_Lio_github_edadma_rdb_NumberValue(v);
4892
- var x39 = x$1.Lio_github_edadma_rdb_NumberValue__f_typ;
4893
- var x40 = x$1.Lio_github_edadma_rdb_NumberValue__f_value;
4912
+ var x43 = x$1.Lio_github_edadma_rdb_NumberValue__f_typ;
4913
+ var x44 = x$1.Lio_github_edadma_rdb_NumberValue__f_value;
4894
4914
  var x = $m_Lio_github_edadma_dal_IntType$();
4895
- if ((x === x39)) {
4896
- return $dp_intValue__I(x40)
4915
+ if ((x === x43)) {
4916
+ return $dp_intValue__I(x44)
4897
4917
  };
4898
4918
  var x$3 = $m_Lio_github_edadma_dal_DoubleType$();
4899
- if ((x$3 === x39)) {
4900
- return $dp_doubleValue__D(x40)
4919
+ if ((x$3 === x43)) {
4920
+ return $dp_doubleValue__D(x44)
4901
4921
  };
4902
4922
  var x$5 = $m_Lio_github_edadma_dal_LongType$();
4903
- if ((x$5 === x39)) {
4904
- return $dp_doubleValue__D(x40)
4923
+ if ((x$5 === x43)) {
4924
+ return $dp_doubleValue__D(x44)
4905
4925
  };
4906
4926
  var x$7 = $m_Lio_github_edadma_dal_BigDecType$();
4907
- if ((x$7 === x39)) {
4908
- return $dp_toString__T(x40)
4927
+ if ((x$7 === x43)) {
4928
+ return $dp_toString__T(x44)
4909
4929
  }
4910
4930
  };
4911
4931
  if ((v instanceof $c_Lio_github_edadma_rdb_TextValue)) {
4912
4932
  var x$1$1 = $as_Lio_github_edadma_rdb_TextValue(v);
4913
- var x24 = x$1$1.Lio_github_edadma_rdb_TextValue__f_s;
4914
- return x24
4933
+ var x28 = x$1$1.Lio_github_edadma_rdb_TextValue__f_s;
4934
+ return x28
4915
4935
  };
4916
4936
  if ((v instanceof $c_Lio_github_edadma_rdb_UUIDValue)) {
4917
4937
  var x$1$2 = $as_Lio_github_edadma_rdb_UUIDValue(v);
4918
- var x21 = x$1$2.Lio_github_edadma_rdb_UUIDValue__f_id;
4919
- return x21
4938
+ var x25 = x$1$2.Lio_github_edadma_rdb_UUIDValue__f_id;
4939
+ return x25
4920
4940
  };
4921
4941
  if ((v instanceof $c_Lio_github_edadma_rdb_TimestampValue)) {
4922
4942
  var x$1$3 = $as_Lio_github_edadma_rdb_TimestampValue(v);
4923
- var x18 = x$1$3.Lio_github_edadma_rdb_TimestampValue__f_t;
4924
- return new Date($m_Lio_github_edadma_datetime_DatetimeFormatter$().Lio_github_edadma_datetime_DatetimeFormatter$__f_ISO.format__Lio_github_edadma_datetime_Datetime__T(x18))
4943
+ var x22 = x$1$3.Lio_github_edadma_rdb_TimestampValue__f_t;
4944
+ return new Date($m_Lio_github_edadma_datetime_DatetimeFormatter$().Lio_github_edadma_datetime_DatetimeFormatter$__f_ISO.format__Lio_github_edadma_datetime_Datetime__T(x22))
4925
4945
  };
4926
4946
  if ((v instanceof $c_Lio_github_edadma_rdb_ArrayValue)) {
4927
4947
  var x$1$4 = $as_Lio_github_edadma_rdb_ArrayValue(v);
4928
- var x15 = x$1$4.Lio_github_edadma_rdb_ArrayValue__f_data;
4929
- var col = $as_sc_IterableOnce(x15.map__F1__O(new $c_sjsr_AnonFunction1(((this$6) => ((v$2) => {
4948
+ var x19 = x$1$4.Lio_github_edadma_rdb_ArrayValue__f_data;
4949
+ var col = $as_sc_IterableOnce(x19.map__F1__O(new $c_sjsr_AnonFunction1(((this$6) => ((v$2) => {
4930
4950
  var v$1 = $as_Lio_github_edadma_rdb_Value(v$2);
4931
4951
  return $m_Lcom_vinctus_oql_RDBResultSet$package$().unpack__Lio_github_edadma_rdb_Value__O(v$1)
4932
4952
  }))(this))));
@@ -4934,8 +4954,8 @@ $c_Lcom_vinctus_oql_RDBResultSet$package$.prototype.unpack__Lio_github_edadma_rd
4934
4954
  };
4935
4955
  if ((v instanceof $c_Lio_github_edadma_rdb_ObjectValue)) {
4936
4956
  var x$1$5 = $as_Lio_github_edadma_rdb_ObjectValue(v);
4937
- var x12 = x$1$5.Lio_github_edadma_rdb_ObjectValue__f_properties;
4938
- var $$x1 = $as_sc_IterableOnceOps(x12.map__F1__O(new $c_sjsr_AnonFunction1(((this$2$1) => ((x$1$6) => {
4957
+ var x16 = x$1$5.Lio_github_edadma_rdb_ObjectValue__f_properties;
4958
+ var $$x1 = $as_sc_IterableOnceOps(x16.map__F1__O(new $c_sjsr_AnonFunction1(((this$2$1) => ((x$1$6) => {
4939
4959
  var x$1$7 = $as_T2(x$1$6);
4940
4960
  if ((x$1$7 !== null)) {
4941
4961
  var k = $as_T(x$1$7._1__O());
@@ -4964,6 +4984,12 @@ $c_Lcom_vinctus_oql_RDBResultSet$package$.prototype.unpack__Lio_github_edadma_rd
4964
4984
  if (((v instanceof $c_Lio_github_edadma_rdb_NullValue) && ($as_Lio_github_edadma_rdb_NullValue(v), true))) {
4965
4985
  return null
4966
4986
  };
4987
+ if ((v instanceof $c_Lio_github_edadma_rdb_EnumValue)) {
4988
+ var x$1$8 = $as_Lio_github_edadma_rdb_EnumValue(v);
4989
+ var x11 = x$1$8.Lio_github_edadma_rdb_EnumValue__f_value;
4990
+ var x12 = x$1$8.Lio_github_edadma_rdb_EnumValue__f_typ;
4991
+ return x12.Lio_github_edadma_rdb_EnumType__f_labels.apply__I__O(x11)
4992
+ };
4967
4993
  throw new $c_s_MatchError(v)
4968
4994
  });
4969
4995
  var $d_Lcom_vinctus_oql_RDBResultSet$package$ = new $TypeData().initClass({
@@ -9552,11 +9578,11 @@ $c_Lio_github_edadma_rdb_eval$package$.prototype.eval__Lio_github_edadma_rdb_Exp
9552
9578
  matchResult12: {
9553
9579
  var b$8;
9554
9580
  if ((x84 === "=")) {
9555
- var b$8 = ((l$4 === null) ? (r$4 === null) : l$4.equals__O__Z(r$4));
9581
+ var b$8 = (l$4.compare__Lio_github_edadma_rdb_Value__I(r$4) === 0);
9556
9582
  break matchResult12
9557
9583
  };
9558
9584
  if ((x84 === "!=")) {
9559
- var b$8 = (!((l$4 === null) ? (r$4 === null) : l$4.equals__O__Z(r$4)));
9585
+ var b$8 = (l$4.compare__Lio_github_edadma_rdb_Value__I(r$4) !== 0);
9560
9586
  break matchResult12
9561
9587
  };
9562
9588
  throw new $c_s_MatchError(x84)
@@ -9608,10 +9634,10 @@ $c_Lio_github_edadma_rdb_eval$package$.prototype.eval__Lio_github_edadma_rdb_Exp
9608
9634
  };
9609
9635
  throw new $c_s_MatchError(x$1$16)
9610
9636
  }))(this, ctx)));
9611
- var x$15 = $m_s_None$();
9612
- if ((x$15 === x39)) {
9613
- var x$17 = $m_s_None$();
9614
- if ((x$17 === x49)) {
9637
+ var x$11 = $m_s_None$();
9638
+ if ((x$11 === x39)) {
9639
+ var x$13 = $m_s_None$();
9640
+ if ((x$13 === x49)) {
9615
9641
  return new $c_Lio_github_edadma_rdb_NullValue()
9616
9642
  };
9617
9643
  if ((x49 instanceof $c_s_Some)) {
@@ -27058,42 +27084,79 @@ function $asArrayOf_Lcom_vinctus_oql_RelationalType(obj, depth) {
27058
27084
  return (($isArrayOf_Lcom_vinctus_oql_RelationalType(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lcom.vinctus.oql.RelationalType;", depth))
27059
27085
  }
27060
27086
  function $f_Lcom_vinctus_oql_SQLDataSource__schema__Lcom_vinctus_oql_DataModel__T($thiz, model) {
27061
- var this$1 = model.Lcom_vinctus_oql_DataModel__f_entities.values__sc_Iterable().toList__sci_List();
27087
+ var this$1 = model.Lcom_vinctus_oql_DataModel__f_enums.values__sc_Iterable().toSeq__sci_Seq();
27062
27088
  var f = new $c_sjsr_AnonFunction1(((_$1) => {
27063
- var _$1$1 = $as_Lcom_vinctus_oql_Entity(_$1);
27064
- return _$1$1.Lcom_vinctus_oql_Entity__f_table
27089
+ var _$1$1 = $as_Lcom_vinctus_oql_EnumType(_$1);
27090
+ return _$1$1.Lcom_vinctus_oql_EnumType__f_name
27065
27091
  }));
27066
27092
  var ord = $m_s_math_Ordering$String$();
27067
- var this$6 = $as_sci_List($f_sc_SeqOps__sortBy__F1__s_math_Ordering__O(this$1, f, ord));
27068
- var f$1 = ((this$2) => ((entity) => {
27093
+ var enums = $as_sci_Seq($as_sc_IterableOps($f_sc_SeqOps__sortBy__F1__s_math_Ordering__O(this$1, f, ord)).map__F1__O(new $c_sjsr_AnonFunction1(((x$1) => {
27094
+ var x$1$1 = $as_Lcom_vinctus_oql_EnumType(x$1);
27095
+ if ((x$1$1 !== null)) {
27096
+ var x3 = x$1$1.Lcom_vinctus_oql_EnumType__f_name;
27097
+ var x4 = x$1$1.Lcom_vinctus_oql_EnumType__f_labels;
27098
+ var f$1 = ((l) => {
27099
+ var l$1 = $as_T(l);
27100
+ return (("'" + l$1) + "'")
27101
+ });
27102
+ if ((x4 === $m_sci_Nil$())) {
27103
+ var this$3 = $m_sci_Nil$()
27104
+ } else {
27105
+ var arg1 = x4.head__O();
27106
+ var h = new $c_sci_$colon$colon(f$1(arg1), $m_sci_Nil$());
27107
+ var t = h;
27108
+ var rest = $as_sci_List(x4.tail__O());
27109
+ while ((rest !== $m_sci_Nil$())) {
27110
+ var arg1$1 = rest.head__O();
27111
+ var nx = new $c_sci_$colon$colon(f$1(arg1$1), $m_sci_Nil$());
27112
+ t.sci_$colon$colon__f_next = nx;
27113
+ t = nx;
27114
+ rest = $as_sci_List(rest.tail__O())
27115
+ };
27116
+ var this$3 = h
27117
+ };
27118
+ return (((("CREATE TYPE \"" + x3) + "\" AS ENUM (") + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "", ", ", "")) + ");\n")
27119
+ };
27120
+ throw new $c_s_MatchError(x$1$1)
27121
+ }))));
27122
+ var this$4 = model.Lcom_vinctus_oql_DataModel__f_entities.values__sc_Iterable().toList__sci_List();
27123
+ var f$2 = new $c_sjsr_AnonFunction1(((_$2) => {
27124
+ var _$2$1 = $as_Lcom_vinctus_oql_Entity(_$2);
27125
+ return _$2$1.Lcom_vinctus_oql_Entity__f_table
27126
+ }));
27127
+ var ord$1 = $m_s_math_Ordering$String$();
27128
+ var this$9 = $as_sci_List($f_sc_SeqOps__sortBy__F1__s_math_Ordering__O(this$4, f$2, ord$1));
27129
+ var f$3 = ((this$5) => ((entity) => {
27069
27130
  var entity$1 = $as_Lcom_vinctus_oql_Entity(entity);
27070
27131
  var columns = $as_sc_Iterable(entity$1.attributes__sci_Map().values__sc_Iterable().withFilter__F1__sc_WithFilter(new $c_sjsr_AnonFunction1(((attribute) => {
27071
27132
  var attribute$1 = $as_Lcom_vinctus_oql_Attribute(attribute);
27072
27133
  return attribute$1.Lcom_vinctus_oql_Attribute__f_typ.isColumnType__Z()
27073
- }))).map__F1__O(new $c_sjsr_AnonFunction1(((this$3) => ((attribute$2) => {
27134
+ }))).map__F1__O(new $c_sjsr_AnonFunction1(((this$6) => ((attribute$2) => {
27074
27135
  var attribute$3 = $as_Lcom_vinctus_oql_Attribute(attribute$2);
27075
- return (attribute$3.Lcom_vinctus_oql_Attribute__f_pk ? ((((" \"" + attribute$3.Lcom_vinctus_oql_Attribute__f_column) + "\" ") + this$3.mapPKType__Lcom_vinctus_oql_TypeSpecifier__T(attribute$3.Lcom_vinctus_oql_Attribute__f_typ)) + " PRIMARY KEY") : ((((" \"" + attribute$3.Lcom_vinctus_oql_Attribute__f_column) + "\" ") + this$3.mapType__Lcom_vinctus_oql_TypeSpecifier__T(attribute$3.Lcom_vinctus_oql_Attribute__f_typ)) + (attribute$3.Lcom_vinctus_oql_Attribute__f_required ? " NOT NULL" : "")))
27076
- }))(this$2))));
27136
+ return (attribute$3.Lcom_vinctus_oql_Attribute__f_pk ? ((((" \"" + attribute$3.Lcom_vinctus_oql_Attribute__f_column) + "\" ") + this$6.mapPKType__Lcom_vinctus_oql_TypeSpecifier__T(attribute$3.Lcom_vinctus_oql_Attribute__f_typ)) + " PRIMARY KEY") : ((((" \"" + attribute$3.Lcom_vinctus_oql_Attribute__f_column) + "\" ") + this$6.mapType__Lcom_vinctus_oql_TypeSpecifier__T(attribute$3.Lcom_vinctus_oql_Attribute__f_typ)) + (attribute$3.Lcom_vinctus_oql_Attribute__f_required ? " NOT NULL" : "")))
27137
+ }))(this$5))));
27077
27138
  var x = $f_T__trim__T((((("\n |CREATE TABLE \"" + entity$1.Lcom_vinctus_oql_Entity__f_table) + "\" (\n |") + $f_sc_IterableOnceOps__mkString__T__T__T__T(columns, "", ",\n", "")) + "\n |);\n |"));
27078
27139
  return $m_sc_StringOps$().stripMargin$extension__T__C__T(x, 124)
27079
27140
  }))($thiz);
27080
- if ((this$6 === $m_sci_Nil$())) {
27141
+ if ((this$9 === $m_sci_Nil$())) {
27081
27142
  var tables = $m_sci_Nil$()
27082
27143
  } else {
27083
- var arg1 = this$6.head__O();
27084
- var h = new $c_sci_$colon$colon(f$1(arg1), $m_sci_Nil$());
27085
- var t = h;
27086
- var rest = $as_sci_List(this$6.tail__O());
27087
- while ((rest !== $m_sci_Nil$())) {
27088
- var arg1$1 = rest.head__O();
27089
- var nx = new $c_sci_$colon$colon(f$1(arg1$1), $m_sci_Nil$());
27090
- t.sci_$colon$colon__f_next = nx;
27091
- t = nx;
27092
- rest = $as_sci_List(rest.tail__O())
27144
+ var arg1$2 = this$9.head__O();
27145
+ var h$1 = new $c_sci_$colon$colon(f$3(arg1$2), $m_sci_Nil$());
27146
+ var t$1 = h$1;
27147
+ var rest$1 = $as_sci_List(this$9.tail__O());
27148
+ while ((rest$1 !== $m_sci_Nil$())) {
27149
+ var arg1$3 = rest$1.head__O();
27150
+ var nx$1 = new $c_sci_$colon$colon(f$3(arg1$3), $m_sci_Nil$());
27151
+ t$1.sci_$colon$colon__f_next = nx$1;
27152
+ t$1 = nx$1;
27153
+ rest$1 = $as_sci_List(rest$1.tail__O())
27093
27154
  };
27094
- var tables = h
27155
+ var tables = h$1
27095
27156
  };
27096
- return $f_sc_IterableOnceOps__mkString__T__T__T__T(tables, "", "", "")
27157
+ var x$2 = $f_sc_IterableOnceOps__mkString__T__T__T__T(enums, "", "", "");
27158
+ var xs = $f_sc_IterableOnceOps__mkString__T__T__T__T(tables, "", "", "");
27159
+ return (("" + x$2) + xs)
27097
27160
  }
27098
27161
  function $f_Lcom_vinctus_oql_SQLDataSource__string__T__T($thiz, s) {
27099
27162
  var this$2 = $as_T(s.split("\\").join("\\\\"));
@@ -27103,14 +27166,14 @@ function $f_Lcom_vinctus_oql_SQLDataSource__string__T__T($thiz, s) {
27103
27166
  }
27104
27167
  function $f_Lcom_vinctus_oql_SQLDataSource__typed__O__Lcom_vinctus_oql_Datatype__T($thiz, a, typ) {
27105
27168
  if (((typeof a) === "string")) {
27106
- var x9 = $as_T(a);
27169
+ var x13 = $as_T(a);
27107
27170
  var x = $m_Lcom_vinctus_oql_TextType$();
27108
27171
  if ((x === typ)) {
27109
- return $thiz.string__T__T(x9)
27172
+ return $thiz.string__T__T(x13)
27110
27173
  };
27111
27174
  var x$3 = $m_Lcom_vinctus_oql_UUIDType$();
27112
27175
  if ((x$3 === typ)) {
27113
- return (("UUID'" + x9) + "'")
27176
+ return (("UUID'" + x13) + "'")
27114
27177
  }
27115
27178
  };
27116
27179
  matchAlts1: {
@@ -35808,9 +35871,9 @@ $c_Lcom_vinctus_oql_RDBDataSource.prototype.mapType__Lcom_vinctus_oql_TypeSpecif
35808
35871
  };
35809
35872
  if ((typ instanceof $c_Lcom_vinctus_oql_DecimalType)) {
35810
35873
  var x$1 = $as_Lcom_vinctus_oql_DecimalType(typ);
35811
- var x11 = x$1.Lcom_vinctus_oql_DecimalType__f_precision;
35812
- var x12 = x$1.Lcom_vinctus_oql_DecimalType__f_scale;
35813
- return (((("DECIMAL(" + x11) + ", ") + x12) + ")")
35874
+ var x15 = x$1.Lcom_vinctus_oql_DecimalType__f_precision;
35875
+ var x16 = x$1.Lcom_vinctus_oql_DecimalType__f_scale;
35876
+ return (((("DECIMAL(" + x15) + ", ") + x16) + ")")
35814
35877
  };
35815
35878
  var x$9 = $m_Lcom_vinctus_oql_DateType$();
35816
35879
  if ((x$9 === typ)) {
@@ -35832,9 +35895,14 @@ $c_Lcom_vinctus_oql_RDBDataSource.prototype.mapType__Lcom_vinctus_oql_TypeSpecif
35832
35895
  if ((x$17 === typ)) {
35833
35896
  return "JSON"
35834
35897
  };
35898
+ if ((typ instanceof $c_Lcom_vinctus_oql_EnumType)) {
35899
+ var x$1$1 = $as_Lcom_vinctus_oql_EnumType(typ);
35900
+ var x11 = x$1$1.Lcom_vinctus_oql_EnumType__f_name;
35901
+ return x11
35902
+ };
35835
35903
  if ((typ instanceof $c_Lcom_vinctus_oql_ManyToOneType)) {
35836
- var x$1$1 = $as_Lcom_vinctus_oql_ManyToOneType(typ);
35837
- var x8 = x$1$1.Lcom_vinctus_oql_ManyToOneType__f_entity;
35904
+ var x$1$2 = $as_Lcom_vinctus_oql_ManyToOneType(typ);
35905
+ var x8 = x$1$2.Lcom_vinctus_oql_ManyToOneType__f_entity;
35838
35906
  return this.mapType__Lcom_vinctus_oql_TypeSpecifier__T($as_Lcom_vinctus_oql_Attribute(x8.pk__s_Option().get__O()).Lcom_vinctus_oql_Attribute__f_typ)
35839
35907
  };
35840
35908
  throw new $c_s_MatchError(typ)
@@ -46349,7 +46417,19 @@ var $d_Lio_github_edadma_rdb_UpdateSet = new $TypeData().initClass({
46349
46417
  });
46350
46418
  $c_Lio_github_edadma_rdb_UpdateSet.prototype.$classData = $d_Lio_github_edadma_rdb_UpdateSet;
46351
46419
  function $f_Lio_github_edadma_rdb_Value__compare__Lio_github_edadma_rdb_Value__I($thiz, that) {
46352
- $m_Lio_github_edadma_rdb_errors$package$().problem__s_util_parsing_input_Position__T__E($thiz.pos__s_util_parsing_input_Position(), (((("'" + $thiz) + "' can't be compared to '") + that) + "''"))
46420
+ if (($thiz instanceof $c_Lio_github_edadma_rdb_NullValue)) {
46421
+ return (-1)
46422
+ } else if ((that instanceof $c_Lio_github_edadma_rdb_NullValue)) {
46423
+ return 1
46424
+ } else {
46425
+ var x = $thiz.vtyp__Lio_github_edadma_rdb_Type();
46426
+ var x$2 = that.vtyp__Lio_github_edadma_rdb_Type();
46427
+ if ((!((x === null) ? (x$2 === null) : x.equals__O__Z(x$2)))) {
46428
+ $m_Lio_github_edadma_rdb_errors$package$().problem__s_util_parsing_input_Position__T__E($thiz.pos__s_util_parsing_input_Position(), (((("'" + $thiz) + "' can't be compared to '") + that) + "''"))
46429
+ } else {
46430
+ return ($thiz.equals__O__Z(that) ? 0 : 1)
46431
+ }
46432
+ }
46353
46433
  }
46354
46434
  function $is_Lio_github_edadma_rdb_Value(obj) {
46355
46435
  return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_github_edadma_rdb_Value)))
@@ -81059,6 +81139,9 @@ $c_sci_VectorMap$$anon$2.prototype.toList__sci_List = (function() {
81059
81139
  $c_sci_VectorMap$$anon$2.prototype.toMap__s_$less$colon$less__sci_Map = (function(ev) {
81060
81140
  return $m_sci_Map$().from__sc_IterableOnce__sci_Map(this)
81061
81141
  });
81142
+ $c_sci_VectorMap$$anon$2.prototype.toSeq__sci_Seq = (function() {
81143
+ return $m_sci_Seq$().from__sc_IterableOnce__sci_Seq(this)
81144
+ });
81062
81145
  $c_sci_VectorMap$$anon$2.prototype.toIndexedSeq__sci_IndexedSeq = (function() {
81063
81146
  return $m_sci_IndexedSeq$().from__sc_IterableOnce__sci_IndexedSeq(this)
81064
81147
  });
@@ -82855,15 +82938,11 @@ $c_Lio_github_edadma_rdb_EnumValue.prototype.pos_$eq__s_util_parsing_input_Posit
82855
82938
  this.Lio_github_edadma_rdb_EnumValue__f_pos = x$1
82856
82939
  });
82857
82940
  $c_Lio_github_edadma_rdb_EnumValue.prototype.compareTo__O__I = (function(that) {
82858
- var that$1 = $as_Lio_github_edadma_rdb_Value(that);
82859
- return $f_Lio_github_edadma_rdb_Value__compare__Lio_github_edadma_rdb_Value__I(this, that$1)
82941
+ return this.compare__Lio_github_edadma_rdb_Value__I($as_Lio_github_edadma_rdb_Value(that))
82860
82942
  });
82861
82943
  $c_Lio_github_edadma_rdb_EnumValue.prototype.vtyp__Lio_github_edadma_rdb_Type = (function() {
82862
82944
  return this.Lio_github_edadma_rdb_EnumValue__f_vtyp
82863
82945
  });
82864
- $c_Lio_github_edadma_rdb_EnumValue.prototype.compare__Lio_github_edadma_rdb_Value__I = (function(that) {
82865
- return $f_Lio_github_edadma_rdb_Value__compare__Lio_github_edadma_rdb_Value__I(this, that)
82866
- });
82867
82946
  $c_Lio_github_edadma_rdb_EnumValue.prototype.next__Lio_github_edadma_rdb_Value = (function() {
82868
82947
  $m_Lio_github_edadma_rdb_errors$package$().problem__s_util_parsing_input_Position__T__E(this.Lio_github_edadma_rdb_EnumValue__f_pos, "can't generate next value")
82869
82948
  });
@@ -82925,9 +83004,43 @@ $c_Lio_github_edadma_rdb_EnumValue.prototype.render__T = (function() {
82925
83004
  $c_Lio_github_edadma_rdb_EnumValue.prototype.string__T = (function() {
82926
83005
  return $as_T(this.Lio_github_edadma_rdb_EnumValue__f_typ.Lio_github_edadma_rdb_EnumType__f_labels.apply__I__O(this.Lio_github_edadma_rdb_EnumValue__f_value))
82927
83006
  });
83007
+ $c_Lio_github_edadma_rdb_EnumValue.prototype.compare__Lio_github_edadma_rdb_Value__I = (function(that) {
83008
+ if ((that instanceof $c_Lio_github_edadma_rdb_EnumValue)) {
83009
+ var x$1 = $as_Lio_github_edadma_rdb_EnumValue(that);
83010
+ var x22 = x$1.Lio_github_edadma_rdb_EnumValue__f_value;
83011
+ var x23 = x$1.Lio_github_edadma_rdb_EnumValue__f_typ;
83012
+ var x = this.Lio_github_edadma_rdb_EnumValue__f_typ;
83013
+ if (((x === null) ? (x23 === null) : x.equals__O__Z(x23))) {
83014
+ var x$2 = this.Lio_github_edadma_rdb_EnumValue__f_value;
83015
+ var this$3 = new $c_sr_RichInt(x$2);
83016
+ $m_s_math_Ordering$Int$();
83017
+ var x$3 = this$3.sr_RichInt__f_self;
83018
+ return ((x$3 === x22) ? 0 : ((x$3 < x22) ? (-1) : 1))
83019
+ }
83020
+ };
83021
+ if ((that instanceof $c_Lio_github_edadma_rdb_TextValue)) {
83022
+ var x17 = $as_Lio_github_edadma_rdb_TextValue(that);
83023
+ var x19 = x17.Lio_github_edadma_rdb_TextValue__f_s;
83024
+ var x13 = this.Lio_github_edadma_rdb_EnumValue__f_typ.Lio_github_edadma_rdb_EnumType__f_labelsMap.get__O__s_Option(x19);
83025
+ var x$3$1 = $m_s_None$();
83026
+ if ((x$3$1 === x13)) {
83027
+ var msg = (((("'" + x19) + "' is not a label of enum '") + this.Lio_github_edadma_rdb_EnumValue__f_typ.Lio_github_edadma_rdb_EnumType__f_name) + "'");
83028
+ $m_Lio_github_edadma_rdb_errors$package$().problem__s_util_parsing_input_Position__T__E(x17.Lio_github_edadma_rdb_TextValue__f_pos, msg)
83029
+ };
83030
+ if ((x13 instanceof $c_s_Some)) {
83031
+ var l = $uI($as_s_Some(x13).s_Some__f_value);
83032
+ var x$4 = this.Lio_github_edadma_rdb_EnumValue__f_value;
83033
+ var this$10 = new $c_sr_RichInt(x$4);
83034
+ $m_s_math_Ordering$Int$();
83035
+ var x$5 = this$10.sr_RichInt__f_self;
83036
+ return ((x$5 === l) ? 0 : ((x$5 < l) ? (-1) : 1))
83037
+ };
83038
+ throw new $c_s_MatchError(x13)
83039
+ };
83040
+ return $f_Lio_github_edadma_rdb_Value__compare__Lio_github_edadma_rdb_Value__I(this, that)
83041
+ });
82928
83042
  $c_Lio_github_edadma_rdb_EnumValue.prototype.compare__O__I = (function(that) {
82929
- var that$1 = $as_Lio_github_edadma_rdb_Value(that);
82930
- return $f_Lio_github_edadma_rdb_Value__compare__Lio_github_edadma_rdb_Value__I(this, that$1)
83043
+ return this.compare__Lio_github_edadma_rdb_Value__I($as_Lio_github_edadma_rdb_Value(that))
82931
83044
  });
82932
83045
  function $as_Lio_github_edadma_rdb_EnumValue(obj) {
82933
83046
  return (((obj instanceof $c_Lio_github_edadma_rdb_EnumValue) || (obj === null)) ? obj : $throwClassCastException(obj, "io.github.edadma.rdb.EnumValue"))
@@ -83876,9 +83989,26 @@ $c_Lio_github_edadma_rdb_TextValue.prototype.string__T = (function() {
83876
83989
  $c_Lio_github_edadma_rdb_TextValue.prototype.compare__Lio_github_edadma_rdb_Value__I = (function(that) {
83877
83990
  if ((that instanceof $c_Lio_github_edadma_rdb_TextValue)) {
83878
83991
  var x$1 = $as_Lio_github_edadma_rdb_TextValue(that);
83879
- var x34 = x$1.Lio_github_edadma_rdb_TextValue__f_s;
83992
+ var x41 = x$1.Lio_github_edadma_rdb_TextValue__f_s;
83880
83993
  var x = this.Lio_github_edadma_rdb_TextValue__f_s;
83881
- return $f_T__compareTo__T__I(x, x34)
83994
+ return $f_T__compareTo__T__I(x, x41)
83995
+ } else if ((that instanceof $c_Lio_github_edadma_rdb_EnumValue)) {
83996
+ var x$1$1 = $as_Lio_github_edadma_rdb_EnumValue(that);
83997
+ var x37 = x$1$1.Lio_github_edadma_rdb_EnumValue__f_value;
83998
+ var x38 = x$1$1.Lio_github_edadma_rdb_EnumValue__f_typ;
83999
+ var x31 = x38.Lio_github_edadma_rdb_EnumType__f_labelsMap.get__O__s_Option(this.Lio_github_edadma_rdb_TextValue__f_s);
84000
+ var x$2 = $m_s_None$();
84001
+ if ((x$2 === x31)) {
84002
+ $m_Lio_github_edadma_rdb_errors$package$().problem__s_util_parsing_input_Position__T__E(this.Lio_github_edadma_rdb_TextValue__f_pos, (((("'" + this.Lio_github_edadma_rdb_TextValue__f_s) + "' is not a label of enum '") + x38.Lio_github_edadma_rdb_EnumType__f_name) + "'"))
84003
+ };
84004
+ if ((x31 instanceof $c_s_Some)) {
84005
+ var l = $uI($as_s_Some(x31).s_Some__f_value);
84006
+ var this$6 = new $c_sr_RichInt(l);
84007
+ $m_s_math_Ordering$Int$();
84008
+ var x$3 = this$6.sr_RichInt__f_self;
84009
+ return ((x$3 === x37) ? 0 : ((x$3 < x37) ? (-1) : 1))
84010
+ };
84011
+ throw new $c_s_MatchError(x31)
83882
84012
  } else {
83883
84013
  return $f_Lio_github_edadma_rdb_Value__compare__Lio_github_edadma_rdb_Value__I(this, that)
83884
84014
  }