orchid-orm 1.72.0 → 1.72.1
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.d.ts +7 -0
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1420,13 +1420,16 @@ const assignTablesToOrm = (tables, result, adapter, qb, asyncStorage, commonOpti
|
|
|
1420
1420
|
const bundleOrchidORMTables = (tables) => {
|
|
1421
1421
|
const result = {};
|
|
1422
1422
|
let dbAwareInstance;
|
|
1423
|
-
for (const key in tables) result[key] = {
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
return
|
|
1428
|
-
|
|
1429
|
-
|
|
1423
|
+
for (const key in tables) result[key] = {
|
|
1424
|
+
table: tables[key].instance().table,
|
|
1425
|
+
makeHelper(arg) {
|
|
1426
|
+
let fn;
|
|
1427
|
+
return (...args) => {
|
|
1428
|
+
if (!fn) fn = dbAwareInstance[key].makeHelper(arg);
|
|
1429
|
+
return fn(...args);
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1430
1433
|
Object.defineProperty(result, orchidORMBundleMetadataKey, {
|
|
1431
1434
|
enumerable: false,
|
|
1432
1435
|
value: {
|