@arcote.tech/arc-adapter-db-postgres 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +54 -50
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2439,38 +2439,6 @@ class ArcPrimitive extends ArcAbstract {
|
|
|
2439
2439
|
return value;
|
|
2440
2440
|
}
|
|
2441
2441
|
}
|
|
2442
|
-
|
|
2443
|
-
class ArcBoolean extends ArcPrimitive {
|
|
2444
|
-
hasToBeTrue() {
|
|
2445
|
-
return this.validation("hasToBeTrue", (value) => {
|
|
2446
|
-
if (!value)
|
|
2447
|
-
return {
|
|
2448
|
-
current: value
|
|
2449
|
-
};
|
|
2450
|
-
});
|
|
2451
|
-
}
|
|
2452
|
-
validation(name, validator) {
|
|
2453
|
-
const instance = this.pipeValidation(name, validator);
|
|
2454
|
-
return instance;
|
|
2455
|
-
}
|
|
2456
|
-
toJsonSchema() {
|
|
2457
|
-
const schema = { type: "boolean" };
|
|
2458
|
-
if (this._description) {
|
|
2459
|
-
schema.description = this._description;
|
|
2460
|
-
}
|
|
2461
|
-
return schema;
|
|
2462
|
-
}
|
|
2463
|
-
getColumnData() {
|
|
2464
|
-
const storeData = this.getStoreData();
|
|
2465
|
-
return {
|
|
2466
|
-
type: "boolean",
|
|
2467
|
-
storeData: {
|
|
2468
|
-
...storeData,
|
|
2469
|
-
isNullable: false
|
|
2470
|
-
}
|
|
2471
|
-
};
|
|
2472
|
-
}
|
|
2473
|
-
}
|
|
2474
2442
|
var stringValidator = typeValidatorBuilder("string");
|
|
2475
2443
|
|
|
2476
2444
|
class ArcString extends ArcPrimitive {
|
|
@@ -2622,6 +2590,60 @@ class ArcString extends ArcPrimitive {
|
|
|
2622
2590
|
function string() {
|
|
2623
2591
|
return new ArcString;
|
|
2624
2592
|
}
|
|
2593
|
+
|
|
2594
|
+
class ArcFragmentBase {
|
|
2595
|
+
is(type) {
|
|
2596
|
+
return this.types.includes(type);
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
class ArcContextElement extends ArcFragmentBase {
|
|
2601
|
+
name;
|
|
2602
|
+
types = ["context-element"];
|
|
2603
|
+
get id() {
|
|
2604
|
+
return this.name;
|
|
2605
|
+
}
|
|
2606
|
+
constructor(name) {
|
|
2607
|
+
super();
|
|
2608
|
+
this.name = name;
|
|
2609
|
+
}
|
|
2610
|
+
_seeds;
|
|
2611
|
+
getSeeds() {
|
|
2612
|
+
return this._seeds;
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
class ArcBoolean extends ArcPrimitive {
|
|
2617
|
+
hasToBeTrue() {
|
|
2618
|
+
return this.validation("hasToBeTrue", (value) => {
|
|
2619
|
+
if (!value)
|
|
2620
|
+
return {
|
|
2621
|
+
current: value
|
|
2622
|
+
};
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
validation(name, validator) {
|
|
2626
|
+
const instance = this.pipeValidation(name, validator);
|
|
2627
|
+
return instance;
|
|
2628
|
+
}
|
|
2629
|
+
toJsonSchema() {
|
|
2630
|
+
const schema = { type: "boolean" };
|
|
2631
|
+
if (this._description) {
|
|
2632
|
+
schema.description = this._description;
|
|
2633
|
+
}
|
|
2634
|
+
return schema;
|
|
2635
|
+
}
|
|
2636
|
+
getColumnData() {
|
|
2637
|
+
const storeData = this.getStoreData();
|
|
2638
|
+
return {
|
|
2639
|
+
type: "boolean",
|
|
2640
|
+
storeData: {
|
|
2641
|
+
...storeData,
|
|
2642
|
+
isNullable: false
|
|
2643
|
+
}
|
|
2644
|
+
};
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2625
2647
|
class ArcId extends ArcBranded {
|
|
2626
2648
|
generateFn;
|
|
2627
2649
|
constructor(name, generateFn) {
|
|
@@ -2691,24 +2713,6 @@ class ArcNumber extends ArcPrimitive {
|
|
|
2691
2713
|
};
|
|
2692
2714
|
}
|
|
2693
2715
|
}
|
|
2694
|
-
class ArcFragmentBase {
|
|
2695
|
-
is(type) {
|
|
2696
|
-
return this.types.includes(type);
|
|
2697
|
-
}
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
class ArcContextElement extends ArcFragmentBase {
|
|
2701
|
-
name;
|
|
2702
|
-
types = ["context-element"];
|
|
2703
|
-
get id() {
|
|
2704
|
-
return this.name;
|
|
2705
|
-
}
|
|
2706
|
-
constructor(name) {
|
|
2707
|
-
super();
|
|
2708
|
-
this.name = name;
|
|
2709
|
-
}
|
|
2710
|
-
}
|
|
2711
|
-
|
|
2712
2716
|
class ArcEvent extends ArcContextElement {
|
|
2713
2717
|
data;
|
|
2714
2718
|
eventId = id("event");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcote.tech/arc-adapter-db-postgres",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"postgres": "^3.4.4"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@arcote.tech/arc": "^0.4.
|
|
26
|
+
"@arcote.tech/arc": "^0.4.7"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/pg": "^8.11.0",
|