@mastra/clickhouse 1.30.0-alpha.0 → 1.30.0-alpha.1
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 -6
- package/dist/docs/assets/SOURCE_MAP.json +7 -7
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/observability/v-next/feedback.d.ts +2 -0
- package/dist/storage/domains/observability/v-next/feedback.d.ts.map +1 -1
- package/dist/storage/domains/observability/v-next/index.d.ts +1 -0
- package/dist/storage/domains/observability/v-next/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/docs/references/reference-storage-composite.md +0 -433
- package/dist/docs/references/reference-storage-retention.md +0 -310
package/dist/docs/SKILL.md
CHANGED
|
@@ -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.
|
|
6
|
+
version: "1.30.0-alpha.1"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -18,10 +18,5 @@ Read the individual reference documents for detailed explanations and code examp
|
|
|
18
18
|
|
|
19
19
|
- [ClickHouse](references/integrations-databases-clickhouse.md) - Use ClickHouse as a Mastra analytical storage backend for observability, scores, and metrics with vNext or legacy storage domain configuration.
|
|
20
20
|
|
|
21
|
-
### Reference
|
|
22
|
-
|
|
23
|
-
- [Reference: Composite storage](references/reference-storage-composite.md) - MastraCompositeStore can compose storage domains from different providers. Use it when you need different databases for different purposes.
|
|
24
|
-
- [Reference: Storage retention (prune)](references/reference-storage-retention.md) - prune() deletes rows. It caps growth and is safe to run against large tables (batched, bounded, resumable, cancellable).
|
|
25
|
-
|
|
26
21
|
|
|
27
22
|
Read [assets/SOURCE_MAP.json](assets/SOURCE_MAP.json) for source code references.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.30.0-alpha.
|
|
2
|
+
"version": "1.30.0-alpha.1",
|
|
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":
|
|
13
|
+
"line": 11912
|
|
14
14
|
},
|
|
15
15
|
"ClickhouseStoreVNext": {
|
|
16
16
|
"types": "dist/storage/index.d.ts",
|
|
17
17
|
"implementation": "dist/index.js",
|
|
18
|
-
"line":
|
|
18
|
+
"line": 12028
|
|
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":
|
|
33
|
+
"line": 10332
|
|
34
34
|
},
|
|
35
35
|
"ScoresStorageClickhouse": {
|
|
36
36
|
"types": "dist/storage/domains/scores/index.d.ts",
|
|
37
37
|
"implementation": "dist/index.js",
|
|
38
|
-
"line":
|
|
38
|
+
"line": 11216
|
|
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":
|
|
53
|
+
"line": 11617
|
|
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":
|
|
58
|
+
"line": 10157
|
|
59
59
|
},
|
|
60
60
|
"markDeletionRequestApplied": {
|
|
61
61
|
"types": "dist/storage/domains/observability/v-next/deletion-requests.d.ts",
|
package/dist/index.cjs
CHANGED
|
@@ -5200,6 +5200,13 @@ async function hasFeedbackDeletionRequest(client, feedbackId, organizationId, re
|
|
|
5200
5200
|
resourceId: resourceId ?? ""
|
|
5201
5201
|
}, FINAL_SKIP_INDEX_SETTINGS)).length > 0;
|
|
5202
5202
|
}
|
|
5203
|
+
/** Retrieves the latest feedback record with this ID, or null when missing. */
|
|
5204
|
+
async function getFeedbackById(client, feedbackId) {
|
|
5205
|
+
const rows = await queryJson$2(client, `SELECT * FROM ${TABLE_FEEDBACK_EVENTS} FINAL
|
|
5206
|
+
WHERE feedbackId = {feedbackId:String}
|
|
5207
|
+
ORDER BY writeVersion DESC, timestamp DESC LIMIT 1`, { feedbackId }, FINAL_SKIP_INDEX_SETTINGS);
|
|
5208
|
+
return rows[0] ? rowToFeedbackRecord(rows[0]) : null;
|
|
5209
|
+
}
|
|
5203
5210
|
/**
|
|
5204
5211
|
* Review updates insert a replacement row, so they need only `INSERT` and the
|
|
5205
5212
|
* insert materialized view publishes the delta cursor.
|
|
@@ -10865,6 +10872,19 @@ var ObservabilityStorageClickhouseVNext = class extends _mastra_core_storage.Obs
|
|
|
10865
10872
|
}, error);
|
|
10866
10873
|
}
|
|
10867
10874
|
}
|
|
10875
|
+
async getFeedbackById(feedbackId) {
|
|
10876
|
+
try {
|
|
10877
|
+
return await getFeedbackById(this.#client, feedbackId);
|
|
10878
|
+
} catch (error) {
|
|
10879
|
+
if (error instanceof _mastra_core_error.MastraError) throw error;
|
|
10880
|
+
throw new _mastra_core_error.MastraError({
|
|
10881
|
+
id: (0, _mastra_core_storage.createStorageErrorId)("CLICKHOUSE", "GET_FEEDBACK_BY_ID", "FAILED"),
|
|
10882
|
+
domain: _mastra_core_error.ErrorDomain.STORAGE,
|
|
10883
|
+
category: _mastra_core_error.ErrorCategory.THIRD_PARTY,
|
|
10884
|
+
details: { feedbackId }
|
|
10885
|
+
}, error);
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10868
10888
|
async createFeedback(args) {
|
|
10869
10889
|
try {
|
|
10870
10890
|
await createFeedback(this.#client, args);
|