%3 ::xotcl::Object ::xotcl::Object ::xo::db::sql::acs_attribute ::xo::db::sql::acs_attribute → add_description → create_attribute → drop_attribute → drop_description ::xo::db::sql::acs_attribute->::xotcl::Object

Class ::xo::db::sql::acs_attribute

::xo::db::sql::acs_attribute[i] create ...

Class Relations

  • class: ::xo::db::Class[i]
  • superclass: ::xotcl::Object[i]
::xo::db::Class create ::xo::db::sql::acs_attribute \
     -superclass ::xotcl::Object

Methods (to be applied on the object)

  • add_description (scripted, public)

     xo::db::sql::acs_attribute[i] add_description [ -dbn dbn ] \
        -object_type object_type  -attribute_name attribute_name  \
        -description_key description_key  -description description 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -object_type
    (required)
    -attribute_name
    (required)
    -description_key
    (required)
    -description
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::acs_attribute proc add_description xo::db::sql::acs_attribute proc add_description xo::db::sql::acs_attribute proc add_description->db_with_handle

    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[i] 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
    (defaults to "1") (optional)
    -max_n_values
    (defaults to "1") (optional)
    -sort_order
    (optional)
    -storage
    (defaults to "type_specific") (optional)
    -static_p
    (defaults to "f") (optional)
    -create_column_p
    (defaults to "f") (optional)
    -database_type
    (optional)
    -size
    (optional)
    -null_p
    (defaults to "t") (optional)
    -references
    (optional)
    -check_expr
    (optional)
    -column_spec
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_xotcl_core_tutorial_2 xotcl_core_tutorial_2 (test xotcl-core) xo::db::sql::acs_attribute proc create_attribute xo::db::sql::acs_attribute proc create_attribute test_xotcl_core_tutorial_2->xo::db::sql::acs_attribute proc create_attribute db_with_handle db_with_handle (public) xo::db::sql::acs_attribute proc create_attribute->db_with_handle

    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[i] 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
    (defaults to "f") (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::acs_attribute proc drop_attribute xo::db::sql::acs_attribute proc drop_attribute xo::db::sql::acs_attribute proc drop_attribute->db_with_handle

    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[i] drop_description [ -dbn dbn ] \
        -object_type object_type  -attribute_name attribute_name  \
        -description_key description_key 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -object_type
    (required)
    -attribute_name
    (required)
    -description_key
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::acs_attribute proc drop_description xo::db::sql::acs_attribute proc drop_description xo::db::sql::acs_attribute proc drop_description->db_with_handle

    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 ]
    }