← Back to Stormify Documentation

Converter

typealias Converter = (column: String, input: String, parser: InputParser, args: SqlArgsCollector) -> String

Converts a facet filter value into a SQL condition fragment.

Parameters: column reference, raw filter value, InputParser for locale-aware transformation, and SqlArgsCollector for staging bind parameters.

Built-in converters handle text (Google-like boolean syntax), numeric (operators and ranges), temporal (date/time operators), and enum (set algebra over display names). Set Facet.converter to override the default for any facet type.

The number of ? placeholders in the returned fragment must match the number of values pushed through the args collector — the engine validates this and throws if they disagree.