orchid-orm 1.17.35 → 1.17.37
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/codegen/index.js +2 -2
- package/codegen/index.js.map +1 -1
- package/codegen/index.mjs +2 -2
- package/codegen/index.mjs.map +1 -1
- package/dist/index.d.ts +147 -142
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -43,6 +43,10 @@ function createBaseTable({
|
|
|
43
43
|
`Failed to determine file path of a base table. Please set the \`filePath\` option of \`createBaseTable\` manually.`
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
+
static instance() {
|
|
47
|
+
var _a2;
|
|
48
|
+
return (_a2 = this._instance) != null ? _a2 : this._instance = new this();
|
|
49
|
+
}
|
|
46
50
|
clone() {
|
|
47
51
|
return this;
|
|
48
52
|
}
|
|
@@ -72,7 +76,7 @@ function createBaseTable({
|
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
|
-
return
|
|
79
|
+
return shape;
|
|
76
80
|
}
|
|
77
81
|
setComputed(computed) {
|
|
78
82
|
return computed;
|
|
@@ -1695,7 +1699,7 @@ const orchidORM = (_a, tables) => {
|
|
|
1695
1699
|
if (key[0] === "$") {
|
|
1696
1700
|
throw new Error(`Table class name must not start with $`);
|
|
1697
1701
|
}
|
|
1698
|
-
const table =
|
|
1702
|
+
const table = tables[key].instance();
|
|
1699
1703
|
tableInstances[key] = table;
|
|
1700
1704
|
const options2 = __spreadProps(__spreadValues$1({}, commonOptions), {
|
|
1701
1705
|
schema: table.schema,
|