@mastra/clickhouse 1.23.0 → 1.24.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.
@@ -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.23.0"
6
+ version: "1.24.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.23.0",
2
+ "version": "1.24.0-alpha.1",
3
3
  "package": "@mastra/clickhouse",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -275,7 +275,6 @@ const TABLE_ENGINES = {
275
275
  [_mastra_core_storage.TABLE_KNOWLEDGE_NODES]: `ReplacingMergeTree()`,
276
276
  [_mastra_core_storage.TABLE_KNOWLEDGE_RECORDS]: `ReplacingMergeTree()`,
277
277
  [_mastra_core_storage.TABLE_KNOWLEDGE_MENTIONS]: `ReplacingMergeTree()`,
278
- [_mastra_core_storage.TABLE_KNOWLEDGE_CURSORS]: `ReplacingMergeTree()`,
279
278
  [_mastra_core_storage.TABLE_KNOWLEDGE_ACTIVITY]: `ReplacingMergeTree()`,
280
279
  [_mastra_core_storage.TABLE_KNOWLEDGE_SEMANTIC_OUTBOX]: `ReplacingMergeTree()`
281
280
  };
@@ -7016,6 +7015,10 @@ function compileScalarPredicate(predicate, registry, parameters, allowMetadata =
7016
7015
  const member = parameters.add(predicate.value, field.parameterType);
7017
7016
  return predicate.operator === "includes" ? `has(${field.sql}, ${member})` : `notEmpty(${field.sql}) AND NOT has(${field.sql}, ${member})`;
7018
7017
  }
7018
+ if (predicate.type === "text") {
7019
+ const found = `position(${`concat(' ', replaceAll(lowerUTF8(replaceRegexpAll(replaceAll(normalizeUTF8NFC(${field.sql}), 'İ', 'i'), '[^\\\\p{L}\\\\p{M}\\\\p{N}]+', ' ')), 'ς', 'σ'), ' ')`}, ${parameters.add(` ${predicate.value} `, "String")}) > 0`;
7020
+ return `ifNull(${predicate.operator === "matches" ? found : `NOT (${found})`}, 0)`;
7021
+ }
7019
7022
  if (predicate.type === "membership") {
7020
7023
  const values = predicate.values.map((value) => parameters.add(value, field.parameterType)).join(", ");
7021
7024
  return `ifNull(${`${field.sql} ${predicate.operator === "in" ? "IN" : "NOT IN"} (${values})`}, ${predicate.operator === "in" ? "0" : "1"})`;