@m1212e/rumble 0.12.8 → 0.12.9
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/out/index.cjs +2 -2
- package/out/index.cjs.map +1 -1
- package/out/index.js +2 -2
- package/out/index.js.map +1 -1
- package/package.json +1 -1
package/out/index.cjs
CHANGED
|
@@ -965,9 +965,9 @@ const createEnumImplementer = ({ db, schemaBuilder }) => {
|
|
|
965
965
|
let enumSchemaName;
|
|
966
966
|
let enumValues;
|
|
967
967
|
if (tsName) {
|
|
968
|
-
const schemaEnum = db._.
|
|
968
|
+
const schemaEnum = db._.fullSchema[tsName];
|
|
969
969
|
enumSchemaName = tsName.toString();
|
|
970
|
-
const enumCol = Object.values(db._.schema).filter((s) => typeof s === "object").map((s) => Object.values(s.columns)).flat(2).find((
|
|
970
|
+
const enumCol = Object.values(db._.schema).filter((s) => typeof s === "object").map((s) => Object.values(s.columns)).flat(2).filter(isEnumSchema).find((e) => e.config.enum === schemaEnum);
|
|
971
971
|
if (!enumCol) throw new RumbleError(`Could not find applied enum column for ${tsName.toString()}.
|
|
972
972
|
Please ensure that you use the enum at least once as a column of a table!`);
|
|
973
973
|
enumValues = enumCol.enumValues;
|