Skip to main content

validate_added_key

Function validate_added_key 

Source
pub fn validate_added_key(
    relation: &AddedKeyRelation<'_>,
    key: &TableKeyConstraint,
) -> Result<(), SQLError>
Expand description

Validate a key that ALTER TABLE adds, before its index is named: its declaration as transformIndexConstraint checks it, a primary key’s columns as the NOT NULL constraints that ATPrepAddPrimaryKey adds before the index, and then the checks of DefineIndex, which resolves the key’s columns.