xo::db::Class proc drop_type (public)
xo::db::Class drop_type -object_type object_type \ [ -drop_table drop_table ] [ -cascade_p cascade_p ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Drop the object_type from the database and drop optionally the table. This method deletes as well all acs_objects of the object_type from the database.
- Switches:
- -object_type (required)
- -drop_table (optional, defaults to
"f"
)- -cascade_p (optional, defaults to
"t"
)- Testcases:
- No testcase defined.
Source code: set table_name [::xo::db::Class get_table_name -object_type $object_type] if {$table_name ne ""} { if {[catch { ::xo::dc dml delete_instances "delete from $table_name" if {$drop_table} { ::xo::dc dml drop_table "drop table $table_name" } } errorMsg]} { ns_log error "error during drop_type: $errorMsg" } } ::acs::dc call acs_object_type drop_type -object_type $object_type -drop_children_p $cascade_p return ""XQL Not present: Generic, PostgreSQL, Oracle