@mastra/clickhouse 0.11.1-alpha.0 → 0.11.1-alpha.2
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +26 -0
- package/dist/_tsup-dts-rollup.d.cts +8 -4
- package/dist/_tsup-dts-rollup.d.ts +8 -4
- package/dist/index.cjs +348 -100
- package/dist/index.js +330 -82
- package/package.json +3 -3
- package/src/storage/index.test.ts +78 -0
- package/src/storage/index.ts +362 -99
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/clickhouse@0.11.1-alpha.
|
|
2
|
+
> @mastra/clickhouse@0.11.1-alpha.2 build /home/runner/work/mastra/mastra/stores/clickhouse
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.5.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 9651ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 11423ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m39.29 KB[39m
|
|
21
|
+
[32mCJS[39m ⚡️ Build success in 1148ms
|
|
22
|
+
[32mESM[39m [1mdist/index.js [22m[32m38.52 KB[39m
|
|
23
|
+
[32mESM[39m ⚡️ Build success in 1148ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @mastra/clickhouse
|
|
2
2
|
|
|
3
|
+
## 0.11.1-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 15e9d26: Added per-resource working memory for LibSQL, Upstash, and PG
|
|
8
|
+
- 0fb9d64: [MASTRA-4018] Update saveMessages in storage adapters to upsert messages
|
|
9
|
+
- Updated dependencies [15e9d26]
|
|
10
|
+
- Updated dependencies [07d6d88]
|
|
11
|
+
- Updated dependencies [5d74aab]
|
|
12
|
+
- Updated dependencies [144eb0b]
|
|
13
|
+
- @mastra/core@0.10.7-alpha.2
|
|
14
|
+
|
|
15
|
+
## 0.11.1-alpha.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 2097952: [MASTRA-4021] Fix PG getMessages and update messageLimit for all storage adapters
|
|
20
|
+
- 0e17048: Throw mastra errors in storage packages
|
|
21
|
+
- Updated dependencies [d1baedb]
|
|
22
|
+
- Updated dependencies [4d21bf2]
|
|
23
|
+
- Updated dependencies [2097952]
|
|
24
|
+
- Updated dependencies [4fb0cc2]
|
|
25
|
+
- Updated dependencies [d2a7a31]
|
|
26
|
+
- Updated dependencies [0e17048]
|
|
27
|
+
- @mastra/core@0.10.7-alpha.1
|
|
28
|
+
|
|
3
29
|
## 0.11.1-alpha.0
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ import type { StorageGetMessagesArg } from '@mastra/core/storage';
|
|
|
10
10
|
import type { StorageGetTracesArg } from '@mastra/core/storage';
|
|
11
11
|
import type { StorageThreadType } from '@mastra/core/memory';
|
|
12
12
|
import type { TABLE_NAMES } from '@mastra/core/storage';
|
|
13
|
+
import type { TABLE_RESOURCES } from '@mastra/core/storage';
|
|
13
14
|
import { TABLE_SCHEMAS } from '@mastra/core/storage';
|
|
14
15
|
import type { Trace } from '@mastra/core/telemetry';
|
|
15
16
|
import type { WorkflowRun } from '@mastra/core/storage';
|
|
@@ -45,6 +46,7 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
45
46
|
protected ttl: ClickhouseConfig['ttl'];
|
|
46
47
|
constructor(config: ClickhouseConfig);
|
|
47
48
|
private transformEvalRow;
|
|
49
|
+
private escape;
|
|
48
50
|
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
49
51
|
batchInsert({ tableName, records }: {
|
|
50
52
|
tableName: TABLE_NAMES;
|
|
@@ -67,7 +69,7 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
67
69
|
tableName: TABLE_NAMES;
|
|
68
70
|
}): Promise<void>;
|
|
69
71
|
createTable({ tableName, schema, }: {
|
|
70
|
-
tableName:
|
|
72
|
+
tableName: SUPPORTED_TABLE_NAMES;
|
|
71
73
|
schema: Record<string, StorageColumn>;
|
|
72
74
|
}): Promise<void>;
|
|
73
75
|
protected getSqlType(type: StorageColumn['type']): string;
|
|
@@ -89,8 +91,8 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
89
91
|
tableName: TABLE_NAMES;
|
|
90
92
|
record: Record<string, any>;
|
|
91
93
|
}): Promise<void>;
|
|
92
|
-
load<R>({ tableName, keys }: {
|
|
93
|
-
tableName:
|
|
94
|
+
load<R>({ tableName, keys, }: {
|
|
95
|
+
tableName: SUPPORTED_TABLE_NAMES;
|
|
94
96
|
keys: Record<string, string>;
|
|
95
97
|
}): Promise<R | null>;
|
|
96
98
|
getThreadById({ threadId }: {
|
|
@@ -180,7 +182,9 @@ export { COLUMN_TYPES as COLUMN_TYPES_alias_1 }
|
|
|
180
182
|
|
|
181
183
|
declare type IntervalUnit = 'NANOSECOND' | 'MICROSECOND' | 'MILLISECOND' | 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
|
|
182
184
|
|
|
183
|
-
declare
|
|
185
|
+
declare type SUPPORTED_TABLE_NAMES = Exclude<TABLE_NAMES, typeof TABLE_RESOURCES>;
|
|
186
|
+
|
|
187
|
+
declare const TABLE_ENGINES: Record<SUPPORTED_TABLE_NAMES, string>;
|
|
184
188
|
export { TABLE_ENGINES }
|
|
185
189
|
export { TABLE_ENGINES as TABLE_ENGINES_alias_1 }
|
|
186
190
|
|
|
@@ -10,6 +10,7 @@ import type { StorageGetMessagesArg } from '@mastra/core/storage';
|
|
|
10
10
|
import type { StorageGetTracesArg } from '@mastra/core/storage';
|
|
11
11
|
import type { StorageThreadType } from '@mastra/core/memory';
|
|
12
12
|
import type { TABLE_NAMES } from '@mastra/core/storage';
|
|
13
|
+
import type { TABLE_RESOURCES } from '@mastra/core/storage';
|
|
13
14
|
import { TABLE_SCHEMAS } from '@mastra/core/storage';
|
|
14
15
|
import type { Trace } from '@mastra/core/telemetry';
|
|
15
16
|
import type { WorkflowRun } from '@mastra/core/storage';
|
|
@@ -45,6 +46,7 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
45
46
|
protected ttl: ClickhouseConfig['ttl'];
|
|
46
47
|
constructor(config: ClickhouseConfig);
|
|
47
48
|
private transformEvalRow;
|
|
49
|
+
private escape;
|
|
48
50
|
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
49
51
|
batchInsert({ tableName, records }: {
|
|
50
52
|
tableName: TABLE_NAMES;
|
|
@@ -67,7 +69,7 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
67
69
|
tableName: TABLE_NAMES;
|
|
68
70
|
}): Promise<void>;
|
|
69
71
|
createTable({ tableName, schema, }: {
|
|
70
|
-
tableName:
|
|
72
|
+
tableName: SUPPORTED_TABLE_NAMES;
|
|
71
73
|
schema: Record<string, StorageColumn>;
|
|
72
74
|
}): Promise<void>;
|
|
73
75
|
protected getSqlType(type: StorageColumn['type']): string;
|
|
@@ -89,8 +91,8 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
89
91
|
tableName: TABLE_NAMES;
|
|
90
92
|
record: Record<string, any>;
|
|
91
93
|
}): Promise<void>;
|
|
92
|
-
load<R>({ tableName, keys }: {
|
|
93
|
-
tableName:
|
|
94
|
+
load<R>({ tableName, keys, }: {
|
|
95
|
+
tableName: SUPPORTED_TABLE_NAMES;
|
|
94
96
|
keys: Record<string, string>;
|
|
95
97
|
}): Promise<R | null>;
|
|
96
98
|
getThreadById({ threadId }: {
|
|
@@ -180,7 +182,9 @@ export { COLUMN_TYPES as COLUMN_TYPES_alias_1 }
|
|
|
180
182
|
|
|
181
183
|
declare type IntervalUnit = 'NANOSECOND' | 'MICROSECOND' | 'MILLISECOND' | 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
|
|
182
184
|
|
|
183
|
-
declare
|
|
185
|
+
declare type SUPPORTED_TABLE_NAMES = Exclude<TABLE_NAMES, typeof TABLE_RESOURCES>;
|
|
186
|
+
|
|
187
|
+
declare const TABLE_ENGINES: Record<SUPPORTED_TABLE_NAMES, string>;
|
|
184
188
|
export { TABLE_ENGINES }
|
|
185
189
|
export { TABLE_ENGINES as TABLE_ENGINES_alias_1 }
|
|
186
190
|
|