drizzle-cube 0.1.40 → 0.1.41
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/adapters/{compiler-BNrqoxJZ.js → compiler-CkjmApqo.js} +4 -0
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/chunks/{components-D6NT6kRL.js → components-DnCh4Y4N.js} +2 -2
- package/dist/client/chunks/components-DnCh4Y4N.js.map +1 -0
- package/dist/client/components.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.d.ts +5 -2
- package/dist/server/index.js +4 -0
- package/package.json +1 -1
- package/dist/client/chunks/components-D6NT6kRL.js.map +0 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -450,8 +450,11 @@ declare interface Measure {
|
|
|
450
450
|
title?: string;
|
|
451
451
|
description?: string;
|
|
452
452
|
type: MeasureType;
|
|
453
|
-
/**
|
|
454
|
-
|
|
453
|
+
/**
|
|
454
|
+
* Column to aggregate or SQL expression
|
|
455
|
+
* Optional for calculated measures (type: 'calculated') which use calculatedSql instead
|
|
456
|
+
*/
|
|
457
|
+
sql?: AnyColumn | SQL | ((ctx: QueryContext) => AnyColumn | SQL);
|
|
455
458
|
/** Display format */
|
|
456
459
|
format?: string;
|
|
457
460
|
/** Whether to show in UI */
|
package/dist/server/index.js
CHANGED
|
@@ -1252,6 +1252,10 @@ class sR {
|
|
|
1252
1252
|
throw new Error(
|
|
1253
1253
|
`Cannot build calculated measure '${E.name}' directly. Use buildCalculatedMeasure instead.`
|
|
1254
1254
|
);
|
|
1255
|
+
if (!E.sql)
|
|
1256
|
+
throw new Error(
|
|
1257
|
+
`Measure '${E.name}' of type '${E.type}' is missing required 'sql' property. Only calculated measures can omit 'sql'.`
|
|
1258
|
+
);
|
|
1255
1259
|
let A = X(E.sql, T);
|
|
1256
1260
|
if (E.filters && E.filters.length > 0) {
|
|
1257
1261
|
const e = E.filters.map((S) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-cube",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"description": "Drizzle ORM-first semantic layer with Cube.js compatibility. Type-safe analytics and dashboards with SQL injection protection.",
|
|
5
5
|
"main": "./dist/server/index.js",
|
|
6
6
|
"types": "./dist/server/index.d.ts",
|