@mastra/clickhouse 1.24.0 → 1.25.0
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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/integrations-databases-clickhouse.md +13 -0
- package/dist/docs/references/reference-storage-composite.md +34 -0
- package/dist/index.cjs +9 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/storage/db/index.d.ts +3 -1
- package/dist/storage/db/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/v-next/trace-query.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -337,6 +337,7 @@ function resolveClickhouseConfig(config) {
|
|
|
337
337
|
username: config.username,
|
|
338
338
|
password: config.password,
|
|
339
339
|
clickhouse_settings: {
|
|
340
|
+
...config.clickhouse_settings,
|
|
340
341
|
date_time_input_format: "best_effort",
|
|
341
342
|
date_time_output_format: "iso",
|
|
342
343
|
use_client_time_zone: 1,
|
|
@@ -7083,18 +7084,14 @@ function compileClickHouseTraceScope(selection, relationCollections, parameters,
|
|
|
7083
7084
|
const to = parameters.add(selection.timeRange.to, "DateTime64(3, 'UTC')");
|
|
7084
7085
|
const tenant = compileTenantScope(scope, parameters);
|
|
7085
7086
|
const ctes = [`current_roots AS (
|
|
7086
|
-
SELECT *
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
)
|
|
7095
|
-
ORDER BY dedupeKey
|
|
7096
|
-
LIMIT 1 BY dedupeKey
|
|
7097
|
-
)
|
|
7087
|
+
SELECT *
|
|
7088
|
+
FROM ${TABLE_TRACE_ROOTS}
|
|
7089
|
+
WHERE traceId IN (
|
|
7090
|
+
SELECT traceId
|
|
7091
|
+
FROM ${TABLE_TRACE_ROOTS} r
|
|
7092
|
+
WHERE startedAt >= ${from}
|
|
7093
|
+
AND startedAt < ${to}${tenant}${seedConjuncts.map((conjunct) => `\n AND (${compilePredicate(conjunct, parameters)})`).join("")}
|
|
7094
|
+
)${tenant}
|
|
7098
7095
|
ORDER BY traceId, dedupeKey
|
|
7099
7096
|
LIMIT 1 BY traceId
|
|
7100
7097
|
)`, `root_scope AS (
|