@mastra/clickhouse 1.23.0 → 1.24.0-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.
@@ -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.0"
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.0",
3
3
  "package": "@mastra/clickhouse",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -7016,6 +7016,10 @@ function compileScalarPredicate(predicate, registry, parameters, allowMetadata =
7016
7016
  const member = parameters.add(predicate.value, field.parameterType);
7017
7017
  return predicate.operator === "includes" ? `has(${field.sql}, ${member})` : `notEmpty(${field.sql}) AND NOT has(${field.sql}, ${member})`;
7018
7018
  }
7019
+ if (predicate.type === "text") {
7020
+ const found = `position(${`concat(' ', replaceAll(lowerUTF8(replaceRegexpAll(replaceAll(normalizeUTF8NFC(${field.sql}), 'İ', 'i'), '[^\\\\p{L}\\\\p{M}\\\\p{N}]+', ' ')), 'ς', 'σ'), ' ')`}, ${parameters.add(` ${predicate.value} `, "String")}) > 0`;
7021
+ return `ifNull(${predicate.operator === "matches" ? found : `NOT (${found})`}, 0)`;
7022
+ }
7019
7023
  if (predicate.type === "membership") {
7020
7024
  const values = predicate.values.map((value) => parameters.add(value, field.parameterType)).join(", ");
7021
7025
  return `ifNull(${`${field.sql} ${predicate.operator === "in" ? "IN" : "NOT IN"} (${values})`}, ${predicate.operator === "in" ? "0" : "1"})`;