Skip to main content

validate_primary_key

Function validate_primary_key 

Source
pub fn validate_primary_key(value: i64) -> Result<u64, CatalogError>
Expand description

Validates a SQL primary-key value for NodeKey::registered.

§Errors

Returns CatalogError::InvalidPrimaryKey for negative values and CatalogError::PrimaryKeyOutOfRange when the key does not fit the lower 32 bits of a NodeKey.

§Performance

This function is O(1).