drizzle-cube 0.2.23 → 0.2.24
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-BFqMax9M.cjs +22 -0
- package/dist/adapters/{compiler-DDXMrb9d.js → compiler-DkzdLcxq.js} +15 -2
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +15 -2
- package/package.json +1 -1
- package/dist/adapters/compiler-S2NEGW7Q.cjs +0 -22
package/dist/server/index.js
CHANGED
|
@@ -2161,6 +2161,10 @@ class GT {
|
|
|
2161
2161
|
}
|
|
2162
2162
|
/**
|
|
2163
2163
|
* Check if a measure type is an aggregate function (requires GROUP BY)
|
|
2164
|
+
*
|
|
2165
|
+
* Note: 'number' is included because users commonly define measures with raw SQL
|
|
2166
|
+
* aggregations (e.g., sql`COUNT(DISTINCT ...)`) and set type: 'number' for the output.
|
|
2167
|
+
* These measures still require GROUP BY when used with time dimensions.
|
|
2164
2168
|
*/
|
|
2165
2169
|
isAggregateFunctionType(E) {
|
|
2166
2170
|
return [
|
|
@@ -2177,7 +2181,8 @@ class GT {
|
|
|
2177
2181
|
"median",
|
|
2178
2182
|
"p95",
|
|
2179
2183
|
"p99",
|
|
2180
|
-
"percentile"
|
|
2184
|
+
"percentile",
|
|
2185
|
+
"number"
|
|
2181
2186
|
].includes(E);
|
|
2182
2187
|
}
|
|
2183
2188
|
/**
|
|
@@ -3849,7 +3854,15 @@ class _E {
|
|
|
3849
3854
|
annotation: L
|
|
3850
3855
|
};
|
|
3851
3856
|
} catch (A) {
|
|
3852
|
-
|
|
3857
|
+
if (A instanceof Error) {
|
|
3858
|
+
let t = A;
|
|
3859
|
+
for (; t.cause instanceof Error; )
|
|
3860
|
+
t = t.cause;
|
|
3861
|
+
let S = t.message;
|
|
3862
|
+
const N = t;
|
|
3863
|
+
throw N.code && (S += ` [${N.code}]`), N.detail && (S += ` Detail: ${N.detail}`), N.hint && (S += ` Hint: ${N.hint}`), A.message = `Query execution failed: ${S}`, A;
|
|
3864
|
+
}
|
|
3865
|
+
throw new Error("Query execution failed: Unknown error");
|
|
3853
3866
|
}
|
|
3854
3867
|
}
|
|
3855
3868
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-cube",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
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",
|