walker: expression WARNING diagnostics (ADR-0027 step C, folds ADR-0026 §7)
Type-mismatched comparisons and `= NULL` / `!= NULL` in a WHERE expression now yield WARNING diagnostics — the command still parses and runs (the ADR-0026 §7 permissive posture is unchanged), but the validity indicator can flag it before submission. Computed post-walk from the built command's `Expr` against the table's column types: a Compare / Between / In with a column operand and a non-null literal whose type the column cannot hold, or a Compare with `=` / `!=` against NULL. New catalog keys `diagnostic.type_mismatch` / `diagnostic.eq_null`. This is ADR-0026's deferred step 5, folded into ADR-0027's diagnostics-severity model as the user requested.
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
/// `(key, expected_placeholders)`. Sorted by key for grep-ability.
|
||||
pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
|
||||
// ---- Pre-submit diagnostics (ADR-0027) ----
|
||||
("diagnostic.eq_null", &[]),
|
||||
("diagnostic.type_mismatch", &["column", "type"]),
|
||||
("diagnostic.unknown_column", &["name", "table"]),
|
||||
("diagnostic.unknown_table", &["name"]),
|
||||
// ---- Already-exists collisions (anchor: "already exists") ----
|
||||
|
||||
Reference in New Issue
Block a user