- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::sql::acs_attribute
::xo::db::sql::acs_attribute create ...
Defined in
Class Relations
::xo::db::Class create ::xo::db::sql::acs_attribute \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
add_description (scripted, public)
xo::db::sql::acs_attribute add_description [ -dbn dbn ] \ -object_type object_type -attribute_name attribute_name \ -description_key description_key -description descriptionAutomatically generated method
- Switches:
- -dbn (optional)
- -object_type (required)
- -attribute_name (required)
- -description_key (required)
- -description (required)
- Testcases:
- No testcase defined.
#function_args: {OBJECT_TYPE {}} {ATTRIBUTE_NAME {}} {DESCRIPTION_KEY {}} {DESCRIPTION {}} foreach var [list OBJECT_TYPE ATTRIBUTE_NAME DESCRIPTION_KEY DESCRIPTION] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select acs_attribute__add_description($_OBJECT_TYPE, $_ATTRIBUTE_NAME, $_DESCRIPTION_KEY, $_DESCRIPTION) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }create_attribute (scripted, public)
xo::db::sql::acs_attribute create_attribute [ -dbn dbn ] \ -object_type object_type -attribute_name attribute_name \ -datatype datatype -pretty_name pretty_name \ [ -pretty_plural pretty_plural ] [ -table_name table_name ] \ [ -column_name column_name ] [ -default_value default_value ] \ [ -min_n_values min_n_values ] [ -max_n_values max_n_values ] \ [ -sort_order sort_order ] [ -storage storage ] \ [ -static_p static_p ] [ -create_column_p create_column_p ] \ [ -database_type database_type ] [ -size size ] [ -null_p null_p ] \ [ -references references ] [ -check_expr check_expr ] \ [ -column_spec column_spec ]Automatically generated method
- Switches:
- -dbn (optional)
- -object_type (required)
- -attribute_name (required)
- -datatype (required)
- -pretty_name (required)
- -pretty_plural (optional)
- -table_name (optional)
- -column_name (optional)
- -default_value (optional)
- -min_n_values (optional, defaults to
"1"
)- -max_n_values (optional, defaults to
"1"
)- -sort_order (optional)
- -storage (optional, defaults to
"type_specific"
)- -static_p (optional, defaults to
"f"
)- -create_column_p (optional, defaults to
"f"
)- -database_type (optional)
- -size (optional)
- -null_p (optional, defaults to
"t"
)- -references (optional)
- -check_expr (optional)
- -column_spec (optional)
- Testcases:
- xotcl_core_tutorial_2
#function_args: {OBJECT_TYPE {}} {ATTRIBUTE_NAME {}} {DATATYPE {}} {PRETTY_NAME {}} {PRETTY_PLURAL null} {TABLE_NAME null} {COLUMN_NAME null} {DEFAULT_VALUE null} {MIN_N_VALUES 1} {MAX_N_VALUES 1} {SORT_ORDER null} {STORAGE type_specific} {STATIC_P f} {CREATE_COLUMN_P f} {DATABASE_TYPE null} {SIZE null} {NULL_P t} {REFERENCES null} {CHECK_EXPR null} {COLUMN_SPEC null} foreach var [list OBJECT_TYPE ATTRIBUTE_NAME DATATYPE PRETTY_NAME PRETTY_PLURAL TABLE_NAME COLUMN_NAME DEFAULT_VALUE MIN_N_VALUES MAX_N_VALUES SORT_ORDER STORAGE STATIC_P CREATE_COLUMN_P DATABASE_TYPE SIZE NULL_P REFERENCES CHECK_EXPR COLUMN_SPEC] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select acs_attribute__create_attribute($_OBJECT_TYPE, $_ATTRIBUTE_NAME, $_DATATYPE, $_PRETTY_NAME, $_PRETTY_PLURAL, $_TABLE_NAME, $_COLUMN_NAME, $_DEFAULT_VALUE, $_MIN_N_VALUES, $_MAX_N_VALUES, $_SORT_ORDER, $_STORAGE, $_STATIC_P, $_CREATE_COLUMN_P, $_DATABASE_TYPE, $_SIZE, $_NULL_P, $_REFERENCES, $_CHECK_EXPR, $_COLUMN_SPEC) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }drop_attribute (scripted, public)
xo::db::sql::acs_attribute drop_attribute [ -dbn dbn ] \ -object_type object_type -attribute_name attribute_name \ [ -drop_column_p drop_column_p ]Automatically generated method
- Switches:
- -dbn (optional)
- -object_type (required)
- -attribute_name (required)
- -drop_column_p (optional, defaults to
"f"
)- Testcases:
- No testcase defined.
#function_args: {OBJECT_TYPE {}} {ATTRIBUTE_NAME {}} {DROP_COLUMN_P f} foreach var [list OBJECT_TYPE ATTRIBUTE_NAME DROP_COLUMN_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_attribute__drop_attribute($_OBJECT_TYPE, $_ATTRIBUTE_NAME, $_DROP_COLUMN_P) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }drop_description (scripted, public)
xo::db::sql::acs_attribute drop_description [ -dbn dbn ] \ -object_type object_type -attribute_name attribute_name \ -description_key description_keyAutomatically generated method
- Switches:
- -dbn (optional)
- -object_type (required)
- -attribute_name (required)
- -description_key (required)
- Testcases:
- No testcase defined.
#function_args: {OBJECT_TYPE {}} {ATTRIBUTE_NAME {}} {DESCRIPTION_KEY {}} foreach var [list OBJECT_TYPE ATTRIBUTE_NAME DESCRIPTION_KEY] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select acs_attribute__drop_description($_OBJECT_TYPE, $_ATTRIBUTE_NAME, $_DESCRIPTION_KEY) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }Variables
::xo::db::sql::acs_attribute set __default_metaclass ::xotcl::Class ::xo::db::sql::acs_attribute set __default_superclass ::xotcl::Object ::xo::db::sql::acs_attribute set abstract_p f ::xo::db::sql::acs_attribute set auto_save false ::xo::db::sql::acs_attribute set name_method {} ::xo::db::sql::acs_attribute set object_type ::xo::db::sql::acs_attribute ::xo::db::sql::acs_attribute set security_inherit_p t ::xo::db::sql::acs_attribute set sql_package_name acs_attribute ::xo::db::sql::acs_attribute set supertype acs_object ::xo::db::sql::acs_attribute set with_table true
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables