xo::db::sql::acs_object_type proc create_type (public)
xo::db::sql::acs_object_type create_type [ -dbn dbn ] \ -object_type object_type -pretty_name pretty_name \ -pretty_plural pretty_plural -supertype supertype \ [ -table_name table_name ] [ -id_column id_column ] \ [ -package_name package_name ] [ -abstract_p abstract_p ] \ [ -type_extension_table type_extension_table ] \ [ -name_method name_method ] [ -create_table_p create_table_p ] \ [ -dynamic_p dynamic_p ]
Defined in packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn
(optional)- -object_type
(required)- -pretty_name
(required)- -pretty_plural
(required)- -supertype
(required)- -table_name
(optional)- -id_column
(optional)- -package_name
(optional)- -abstract_p
(defaults to"f"
) (optional)- -type_extension_table
(optional)- -name_method
(optional)- -create_table_p
(defaults to"f"
) (optional)- -dynamic_p
(defaults to"f"
) (optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xotcl_core_tutorial_2
Source code: #function_args: {OBJECT_TYPE {}} {PRETTY_NAME {}} {PRETTY_PLURAL {}} {SUPERTYPE {}} {TABLE_NAME null} {ID_COLUMN null} {PACKAGE_NAME null} {ABSTRACT_P f} {TYPE_EXTENSION_TABLE null} {NAME_METHOD null} {CREATE_TABLE_P f} {DYNAMIC_P f} foreach var [list OBJECT_TYPE PRETTY_NAME PRETTY_PLURAL SUPERTYPE TABLE_NAME ID_COLUMN PACKAGE_NAME ABSTRACT_P TYPE_EXTENSION_TABLE NAME_METHOD CREATE_TABLE_P DYNAMIC_P] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select acs_object_type__create_type($_OBJECT_TYPE, $_PRETTY_NAME, $_PRETTY_PLURAL, $_SUPERTYPE, $_TABLE_NAME, $_ID_COLUMN, $_PACKAGE_NAME, $_ABSTRACT_P, $_TYPE_EXTENSION_TABLE, $_NAME_METHOD, $_CREATE_TABLE_P, $_DYNAMIC_P) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }XQL Not present: Generic, PostgreSQL, Oracle