Class ::xo::db::sql::apm_package_type (public)
::xo::db::Class ::xo::db::sql::apm_package_type
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::apm_package_type {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object
set :abstract_p f
set :auto_save false
set :name_method {}
set :object_type ::xo::db::sql::apm_package_type
set :security_inherit_p t
set :sql_package_name apm_package_type
set :supertype acs_object
set :with_table true}
::xo::db::sql::apm_package_type proc update_type {{-dbn {}} -package_key:required -pretty_name -pretty_plural -package_uri -package_type -initial_install_p -singleton_p -implements_subsite_p -inherit_templates_p -spec_file_path -spec_file_mtime} {
foreach var [list PACKAGE_KEY PRETTY_NAME PRETTY_PLURAL PACKAGE_URI PACKAGE_TYPE INITIAL_INSTALL_P SINGLETON_P IMPLEMENTS_SUBSITE_P INHERIT_TEMPLATES_P SPEC_FILE_PATH SPEC_FILE_MTIME] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select apm_package_type__update_type($_PACKAGE_KEY, $_PRETTY_NAME, $_PRETTY_PLURAL, $_PACKAGE_URI, $_PACKAGE_TYPE, $_INITIAL_INSTALL_P, $_SINGLETON_P, $_IMPLEMENTS_SUBSITE_P, $_INHERIT_TEMPLATES_P, $_SPEC_FILE_PATH, $_SPEC_FILE_MTIME)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::apm_package_type proc create_type {{-dbn {}} -package_key:required -pretty_name:required -pretty_plural:required -package_uri:required -package_type:required -initial_install_p:required -singleton_p:required -implements_subsite_p:required -inherit_templates_p:required -spec_file_path -spec_file_mtime} {
foreach var [list PACKAGE_KEY PRETTY_NAME PRETTY_PLURAL PACKAGE_URI PACKAGE_TYPE INITIAL_INSTALL_P SINGLETON_P IMPLEMENTS_SUBSITE_P INHERIT_TEMPLATES_P SPEC_FILE_PATH SPEC_FILE_MTIME] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select apm_package_type__create_type($_PACKAGE_KEY, $_PRETTY_NAME, $_PRETTY_PLURAL, $_PACKAGE_URI, $_PACKAGE_TYPE, $_INITIAL_INSTALL_P, $_SINGLETON_P, $_IMPLEMENTS_SUBSITE_P, $_INHERIT_TEMPLATES_P, $_SPEC_FILE_PATH, $_SPEC_FILE_MTIME)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::apm_package_type proc drop_type {{-dbn {}} -package_key:required {-cascade_p f}} {
foreach var [list PACKAGE_KEY CASCADE_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select apm_package_type__drop_type($_PACKAGE_KEY, $_CASCADE_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::apm_package_type proc num_parameters {{-dbn {}} -package_key:required} {
foreach var [list PACKAGE_KEY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select apm_package_type__num_parameters($_PACKAGE_KEY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
XQL Not present:Generic, PostgreSQL, Oracle
[
hide source ]
| [
make this the default ]