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:
+11
-5
@@ -968,7 +968,13 @@ pub static DROP: CommandNode = CommandNode {
|
||||
shape: DROP_SHAPE,
|
||||
ast_builder: build_drop,
|
||||
help_id: Some("ddl.drop"),
|
||||
hint_ids: &[],
|
||||
hint_ids: &[
|
||||
"drop_table",
|
||||
"drop_column",
|
||||
"drop_relationship",
|
||||
"drop_index",
|
||||
"drop_constraint",
|
||||
],
|
||||
usage_ids: &[
|
||||
"parse.usage.drop_table",
|
||||
"parse.usage.drop_column",
|
||||
@@ -1004,7 +1010,7 @@ pub static RENAME: CommandNode = CommandNode {
|
||||
shape: RENAME_COLUMN,
|
||||
ast_builder: build_rename_column,
|
||||
help_id: Some("ddl.rename"),
|
||||
hint_ids: &[],
|
||||
hint_ids: &["rename_column"],
|
||||
usage_ids: &["parse.usage.rename_column"],};
|
||||
|
||||
pub static CHANGE: CommandNode = CommandNode {
|
||||
@@ -1012,7 +1018,7 @@ pub static CHANGE: CommandNode = CommandNode {
|
||||
shape: CHANGE_COLUMN,
|
||||
ast_builder: build_change_column,
|
||||
help_id: Some("ddl.change"),
|
||||
hint_ids: &[],
|
||||
hint_ids: &["change_column"],
|
||||
usage_ids: &["parse.usage.change_column"],};
|
||||
|
||||
// =================================================================
|
||||
@@ -1373,7 +1379,7 @@ pub static CREATE: CommandNode = CommandNode {
|
||||
shape: CREATE_TABLE,
|
||||
ast_builder: build_create_table,
|
||||
help_id: Some("ddl.create"),
|
||||
hint_ids: &[],
|
||||
hint_ids: &["create_table"],
|
||||
usage_ids: &["parse.usage.create_table"],};
|
||||
|
||||
// =================================================================
|
||||
@@ -1442,7 +1448,7 @@ pub static CREATE_M2N: CommandNode = CommandNode {
|
||||
shape: CREATE_M2N_SHAPE,
|
||||
ast_builder: build_create_m2n,
|
||||
help_id: Some("ddl.create_m2n"),
|
||||
hint_ids: &[],
|
||||
hint_ids: &["create_m2n"],
|
||||
usage_ids: &["parse.usage.create_m2n"],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user