@mastra/clickhouse 1.30.0-alpha.3 → 1.30.0-alpha.4

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.
@@ -3,7 +3,7 @@ name: mastra-clickhouse
3
3
  description: Documentation for @mastra/clickhouse. Use when working with @mastra/clickhouse APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/clickhouse"
6
- version: "1.30.0-alpha.3"
6
+ version: "1.30.0-alpha.4"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.30.0-alpha.3",
2
+ "version": "1.30.0-alpha.4",
3
3
  "package": "@mastra/clickhouse",
4
4
  "exports": {
5
5
  "COLUMN_TYPES": {
@@ -10,12 +10,12 @@
10
10
  "ClickhouseStore": {
11
11
  "types": "dist/storage/index.d.ts",
12
12
  "implementation": "dist/index.js",
13
- "line": 11922
13
+ "line": 11926
14
14
  },
15
15
  "ClickhouseStoreVNext": {
16
16
  "types": "dist/storage/index.d.ts",
17
17
  "implementation": "dist/index.js",
18
- "line": 12038
18
+ "line": 12042
19
19
  },
20
20
  "MemoryStorageClickhouse": {
21
21
  "types": "dist/storage/domains/memory/index.d.ts",
@@ -30,12 +30,12 @@
30
30
  "ObservabilityStorageClickhouseVNext": {
31
31
  "types": "dist/storage/domains/observability/v-next/index.d.ts",
32
32
  "implementation": "dist/index.js",
33
- "line": 10340
33
+ "line": 10344
34
34
  },
35
35
  "ScoresStorageClickhouse": {
36
36
  "types": "dist/storage/domains/scores/index.d.ts",
37
37
  "implementation": "dist/index.js",
38
- "line": 11226
38
+ "line": 11230
39
39
  },
40
40
  "TABLE_DELETION_REQUESTS": {
41
41
  "types": "dist/storage/domains/observability/v-next/ddl.d.ts",
@@ -50,12 +50,12 @@
50
50
  "WorkflowsStorageClickhouse": {
51
51
  "types": "dist/storage/domains/workflows/index.d.ts",
52
52
  "implementation": "dist/index.js",
53
- "line": 11627
53
+ "line": 11631
54
54
  },
55
55
  "applyClickHouseRetention": {
56
56
  "types": "dist/storage/domains/observability/v-next/index.d.ts",
57
57
  "implementation": "dist/index.js",
58
- "line": 10165
58
+ "line": 10169
59
59
  },
60
60
  "markDeletionRequestApplied": {
61
61
  "types": "dist/storage/domains/observability/v-next/deletion-requests.d.ts",
package/dist/index.cjs CHANGED
@@ -8239,9 +8239,10 @@ function afterCursor$1(plan, parameters) {
8239
8239
  if (cursor.sortValue === null) equal.push(`isNull(${field})`);
8240
8240
  else {
8241
8241
  const numeric = typeof cursor.sortValue === "number";
8242
- const value = parameters.add(cursor.sortValue, numeric ? "Float64" : "DateTime64(3, 'UTC')");
8242
+ const stringSort = plan.orderBy.field === "model" || plan.orderBy.field === "provider";
8243
+ const value = parameters.add(cursor.sortValue, stringSort ? "String" : numeric ? "Float64" : "DateTime64(3, 'UTC')");
8243
8244
  terms.push(`${field} ${plan.orderBy.direction === "asc" ? ">" : "<"} ${value}`);
8244
- if (numeric) terms.push(`isNull(${field})`);
8245
+ if (numeric || stringSort) terms.push(`isNull(${field})`);
8245
8246
  equal.push(`${field} = ${value}`);
8246
8247
  }
8247
8248
  for (const key of identityFields) {
@@ -8509,6 +8510,8 @@ async function querySpans(client, plan, timeoutMs) {
8509
8510
  return [{
8510
8511
  ...metadata,
8511
8512
  ...identity,
8513
+ model: row.model,
8514
+ provider: row.provider,
8512
8515
  durationMs: Number(row.durationMs),
8513
8516
  ...timeToFirstChunkSupported && { timeToFirstChunkMs: timeToFirstChunkMs == null ? null : Number(timeToFirstChunkMs) },
8514
8517
  ...timeToFirstTokenSupported && { timeToFirstTokenMs: timeToFirstTokenMs == null ? null : Number(timeToFirstTokenMs) },
@@ -10065,6 +10068,7 @@ const spanQueryFeatures = typeof _mastra_core_storage.planSpanQuery === "functio
10065
10068
  "span-query",
10066
10069
  "span-query-context-fields",
10067
10070
  ..._mastra_core_storage.SPAN_QUERY_ORDER_FIELDS?.includes("durationMs") ? ["span-query-duration-sort"] : [],
10071
+ ..._mastra_core_storage.SPAN_QUERY_ORDER_FIELDS?.includes("model") && _mastra_core_storage.SPAN_QUERY_ORDER_FIELDS?.includes("provider") ? ["span-query-model-provider-sort"] : [],
10068
10072
  ..."model" in (_mastra_core_storage.SPAN_QUERY_FIELD_REGISTRY ?? {}) ? ["span-query-model-fields"] : []
10069
10073
  ] : [];
10070
10074
  const spanAggregateFeatures = typeof _mastra_core_storage.planSpanAggregate === "function" ? ["span-aggregate", ..."model" in (_mastra_core_storage.SPAN_AGGREGATE_DIMENSION_REGISTRY ?? {}) ? ["span-aggregate-model-dimensions"] : []] : [];