@mastra/clickhouse 1.0.0-beta.4 → 1.0.0-beta.5
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/CHANGELOG.md +13 -0
- package/dist/index.cjs +27 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/utils.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +4 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13,7 +13,8 @@ var TABLE_ENGINES = {
|
|
|
13
13
|
[TABLE_SCORERS]: `MergeTree()`,
|
|
14
14
|
[TABLE_RESOURCES]: `ReplacingMergeTree()`,
|
|
15
15
|
// TODO: verify this is the correct engine for Spans when implementing clickhouse storage
|
|
16
|
-
[TABLE_SPANS]: `ReplacingMergeTree()
|
|
16
|
+
[TABLE_SPANS]: `ReplacingMergeTree()`,
|
|
17
|
+
mastra_agents: `ReplacingMergeTree()`
|
|
17
18
|
};
|
|
18
19
|
var COLUMN_TYPES = {
|
|
19
20
|
text: "String",
|
|
@@ -2154,6 +2155,28 @@ var WorkflowsStorageClickhouse = class extends WorkflowsStorage {
|
|
|
2154
2155
|
);
|
|
2155
2156
|
}
|
|
2156
2157
|
}
|
|
2158
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2159
|
+
try {
|
|
2160
|
+
const values = {
|
|
2161
|
+
var_runId: runId,
|
|
2162
|
+
var_workflow_name: workflowName
|
|
2163
|
+
};
|
|
2164
|
+
await this.client.command({
|
|
2165
|
+
query: `DELETE FROM ${TABLE_WORKFLOW_SNAPSHOT} WHERE run_id = {var_runId:String} AND workflow_name = {var_workflow_name:String}`,
|
|
2166
|
+
query_params: values
|
|
2167
|
+
});
|
|
2168
|
+
} catch (error) {
|
|
2169
|
+
throw new MastraError(
|
|
2170
|
+
{
|
|
2171
|
+
id: createStorageErrorId("CLICKHOUSE", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2172
|
+
domain: ErrorDomain.STORAGE,
|
|
2173
|
+
category: ErrorCategory.THIRD_PARTY,
|
|
2174
|
+
details: { runId, workflowName }
|
|
2175
|
+
},
|
|
2176
|
+
error
|
|
2177
|
+
);
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2157
2180
|
};
|
|
2158
2181
|
|
|
2159
2182
|
// src/storage/index.ts
|
|
@@ -2298,6 +2321,9 @@ var ClickhouseStore = class extends MastraStorage {
|
|
|
2298
2321
|
}) {
|
|
2299
2322
|
return this.stores.workflows.getWorkflowRunById({ runId, workflowName });
|
|
2300
2323
|
}
|
|
2324
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2325
|
+
return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
2326
|
+
}
|
|
2301
2327
|
async getThreadById({ threadId }) {
|
|
2302
2328
|
return this.stores.memory.getThreadById({ threadId });
|
|
2303
2329
|
}
|