feat(hint): H2 Phase C batch 2 — DDL tier-3 hints (ADR-0053)
Per-form hints for the schema-shaping commands: create table, create m:n, add column/index/constraint, drop table/column/relationship/ index/constraint, rename column, change column (add_relationship was the Phase-B exemplar). Examples verified against the canonical usage templates. hint_ids wired on CREATE/CREATE_M2N/DROP/RENAME/CHANGE; catalogue + keys.rs registered. +2 spot tests (incl. multi-form DROP disambiguation); 2491 pass / 1 ignored, clippy clean.
This commit is contained in:
+20
@@ -5862,6 +5862,26 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
// ── Phase C batch 2: DDL hints render (incl. multi-form DROP) ──
|
||||
|
||||
#[test]
|
||||
fn f1_on_create_table_renders_its_hint_block() {
|
||||
let mut app = App::new();
|
||||
type_str(&mut app, "create table Customers with pk id(serial)");
|
||||
f1(&mut app);
|
||||
assert!(output_contains(&app, "Create a new table"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn f1_disambiguates_drop_forms() {
|
||||
let mut app = App::new();
|
||||
type_str(&mut app, "drop index idx_email");
|
||||
f1(&mut app);
|
||||
// Resolves drop_index, not drop_table/column/etc.
|
||||
assert!(output_contains(&app, "Remove an index by name"));
|
||||
assert!(!output_contains(&app, "Remove a table"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn messages_command_toggles_verbosity_and_reports() {
|
||||
let mut app = App::new();
|
||||
|
||||
Reference in New Issue
Block a user