//! Matrix coverage for `delete from T --all-rows` (ADR-0014). use crate::typing_surface::*; use rdbms_playground::input_render::InputState; #[test] fn complete_delete_all_rows_parses() { let schema = schema_serial_pk(); let a = assess_at_end("delete from Customers --all-rows", &schema); assert!(matches!(a.state, InputState::Valid)); assert_eq!(a.parse_result.as_deref(), Ok("Delete")); crate::snap!("complete_all_rows", a); } #[test] fn delete_without_filter_clause_is_incomplete() { // Per ADR-0014 — delete requires WHERE or --all-rows. let schema = schema_serial_pk(); let a = assess_at_end("delete from Customers", &schema); assert!(matches!(a.state, InputState::IncompleteAtEof)); crate::snap!("no_filter", a); } #[test] fn delete_partial_flag_is_incomplete() { let schema = schema_serial_pk(); let a = assess_at_end("delete from Customers --all", &schema); assert!(!matches!(a.state, InputState::Valid)); crate::snap!("partial_flag", a); }