xo::db::require proc unique
xo::db::requireunique
- Testcases:
- xotcl_core_tutorial_2, xotcl-core
Source code: # Unique could be there by an index too set idxname [::xo::dc mk_sql_constraint_name $table $col un_idx] if {[::acs::dc call util index_exists -name $idxname]} return if {![::acs::dc call util unique_exists -table $table -column $col]} { ::xo::dc dml alter-table-$table "alter table $table add unique ($col)" }XQL Not present: Generic, PostgreSQL, Oracle