UNPKG

lakutata

Version:

An IoC-based universal application framework.

43 lines (35 loc) 1.16 kB
/* Build Date: Mon Jan 05 2026 23:52:23 GMT+0800 (China Standard Time) */ "use strict"; const e = require("./Package.internal.51.cjs"); var t = {}; Object.defineProperty(t, "__esModule", { value: true }); exports.VirtualColumn_2 = t.VirtualColumn = n; const r = e.error; const o = e.requireGlobals(); function n(e, t) { return function(n, s) { let i; if (typeof e === "string") { i = e; } else { t = e; i = t.type; } if (!t?.query) { throw new Error("Column options must be defined for calculated columns."); } const u = Reflect && Reflect.getMetadata ? Reflect.getMetadata("design:type", n, s) : undefined; if (!i && u) i = u; if (i) t.type = i; if (t.type === "hstore" && !t.hstoreType) t.hstoreType = u === Object ? "object" : "string"; if (!t.type) throw new r.ColumnTypeUndefinedError(n, s); (0, o.getMetadataArgsStorage)().columns.push({ target: n.constructor, propertyName: s, mode: "virtual-property", options: t || {} }); }; }