Class SqlTruth

java.lang.Object
dev.frostlake.executor.expressions.SqlTruth

public final class SqlTruth extends Object
The single truthiness rule for a value in predicate position — Snowflake's implicit boolean coercion: a BOOLEAN as itself, a VARCHAR via TO_BOOLEAN's text forms ('true', 't', 'yes', 'y', 'on', '1', case-insensitive), a number as zero/non-zero, NULL and anything else as FALSE. Every consumer that filters on a raw evaluation result (WHERE / HAVING / join conditions / conditional inserts) must use this rather than testing instanceof Boolean — a bare WHERE is_direct over a VARCHAR column holding 'true' is a real loader idiom and silently dropped every row otherwise.
  • Method Details

    • isTrue

      public static boolean isTrue(Object value)