isFilterColumnType (clickhouse-sql/filterTypeCompatibility.ts)

langfuse · packages/shared/src/server/queries/clickhouse-sql/filterTypeCompatibility.ts · typescript · MIT
database, tag:knn-classified

Module exposing: isFilterColumnType, getCompatibleFilterTypes

// Source: https://github.com/langfuse/langfuse | License: MIT | Copyright 2023-2026 ClickHouse, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import type { ColumnDefinition } from "../../../tableDefinitions";
import type { FilterCondition } from "../../../types";

export type FilterColumnType = ColumnDefinition["type"];
export type CompatibleFilterType = FilterCondition["type"];

export const COMPATIBLE_FILTER_TYPES: Partial<
  Record<FilterColumnType, readonly CompatibleFilterType[]>
> = {
  string: ["string", "stringOptions"],
  stringOptions: ["string", "stringOptions"],
  arrayOptions: ["arrayOptions", "stringOptions"],
  datetime: ["datetime"],
  number: ["number"],
  boolean: ["boolean"],
  stringObject: ["stringObject"],
  numberObject: ["numberObject"],
  bo

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key