@mastra/clickhouse 1.25.0-alpha.0 → 1.25.1-alpha.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
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.25.
|
|
6
|
+
version: "1.25.1-alpha.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -965,12 +965,23 @@ var MemoryStorageClickhouse = class extends _mastra_core_storage.MemoryStorage {
|
|
|
965
965
|
query_params: { messageIds }
|
|
966
966
|
});
|
|
967
967
|
if (threadIds.length > 0) {
|
|
968
|
-
const now =
|
|
969
|
-
await this.
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
968
|
+
const now = Date.now();
|
|
969
|
+
const existingThreads = await this.getLatestThreads(threadIds);
|
|
970
|
+
if (existingThreads.size > 0) await this.client.insert({
|
|
971
|
+
table: _mastra_core_storage.TABLE_THREADS,
|
|
972
|
+
format: "JSONEachRow",
|
|
973
|
+
values: Array.from(existingThreads.values()).map((existingThread) => ({
|
|
974
|
+
id: existingThread.id,
|
|
975
|
+
resourceId: existingThread.resourceId,
|
|
976
|
+
title: existingThread.title,
|
|
977
|
+
metadata: serializeMetadata(existingThread.metadata),
|
|
978
|
+
createdAt: existingThread.createdAt,
|
|
979
|
+
updatedAt: new Date(Math.max(now, new Date(existingThread.updatedAt).getTime() + 1)).toISOString().replace("Z", "")
|
|
980
|
+
})),
|
|
981
|
+
clickhouse_settings: {
|
|
982
|
+
date_time_input_format: "best_effort",
|
|
983
|
+
use_client_time_zone: 1,
|
|
984
|
+
output_format_json_quote_64bit_integers: 0
|
|
974
985
|
}
|
|
975
986
|
});
|
|
976
987
|
}
|