Safety

Parameter values never become SQL text. Every {{name}} and {{self.field}} compiles to ? or $1, $2, … and the value is returned in parameters. sort() splices only expressions written in the SQL, chosen by an allowlisted key, and dir() accepts only the six fixed directions.

The SQL string itself is trusted. Do not build it from caller input, and execute the compiled statement with the returned binds.

The compiler also rejects SQL that would misalign binds or hide part of the statement: