explain: typing-surface matrix cells (ADR-0028 step 5)

13 matrix cells for the `explain` prefix across all three
wrapped commands — `explain show data` / `explain update` /
`explain delete` — covering each typing position (after the
prefix, the inner entry word, the table, the filter clause)
plus the three complete forms. The cells confirm `explain`
plugs into the inner query grammars cleanly: candidates, hints
and column scoping match the standalone commands, and the
complete forms parse as `Command::Explain`.

Also adds a worker test pinning the display SQL's `<>`
rendering of inequality (ADR-0028 §3).

Matrix: 161 -> 174 cells. 1172 tests pass; clippy clean.
This commit is contained in:
claude@clouddev1
2026-05-19 12:49:58 +00:00
parent a7d459f8f2
commit ae99276283
16 changed files with 678 additions and 0 deletions
+22
View File
@@ -8247,6 +8247,28 @@ mod tests {
);
}
#[tokio::test]
async fn explain_display_sql_writes_inequality_as_angle_brackets() {
let db = db();
people_table(&db).await;
let plan = db
.explain_query_plan(parse_inner("show data People where Age != 35"))
.await
.unwrap();
// ADR-0028 §3: inequality is shown as standard SQL `<>`
// even when the user typed `!=`.
assert!(
plan.display_sql.contains("<>"),
"inequality should render as `<>`: {}",
plan.display_sql,
);
assert!(
!plan.display_sql.contains("!="),
"the `!=` spelling should not survive: {}",
plan.display_sql,
);
}
#[tokio::test]
async fn explain_of_a_missing_table_is_an_error() {
let db = db();