use schema_model::model::column::Column;
use schema_sql_generator::common::column_constraint_generator::DefaultColumnConstraintGenerator;
use schema_sql_generator::common::constraint_naming::hashed_constraint_name;
use schema_sql_generator::common::generator_context::GeneratorContext;
const CK_PREFIX: &str = "ck_";
pub fn constraint_name(table_name: &str, column_name: &str) -> String {
hashed_constraint_name(CK_PREFIX, table_name, column_name)
}
pub fn check_constraint_sql(context: &GeneratorContext, column: &Column) -> Option<String> {
DefaultColumnConstraintGenerator::new(context.clone()).check_constraint_sql(column)
}