xo::db::require proc not_null (public)

 xo::db::require[i] not_null [ -table table ] [ -col col ]

Defined in /var/www/openacs/packages/xotcl-core/tcl/05-db-procs.tcl

Add a NOT NULL constraint if the column does not already have one.

Switches:
-table (optional)
Table to alter.
-col (optional)
Column name.

Testcases:
xotcl_core_tutorial_2
Source code:
set exists_p [::acs::dc call util not_null_exists -table $table -column $col]
if {!$exists_p} {
  ::xo::dc dml alter-table-$table  "alter table $table alter column $col set not null"
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: