Class ::xo::db::sql::acs_object_type

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

Class Relations

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

Methods (to be applied on the object)

  • create_type (scripted, public)

     xo::db::sql::acs_object_type[i] 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 ]

    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):
    %3 test_xotcl_core_tutorial_2 xotcl_core_tutorial_2 (test xotcl-core) xo::db::sql::acs_object_type proc create_type xo::db::sql::acs_object_type proc create_type test_xotcl_core_tutorial_2->xo::db::sql::acs_object_type proc create_type db_with_handle db_with_handle (public) xo::db::sql::acs_object_type proc create_type->db_with_handle

    Testcases:
    xotcl_core_tutorial_2
    #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 ]
    }
  • drop_type (scripted, public)

     xo::db::sql::acs_object_type[i] drop_type [ -dbn dbn ] \
        -object_type object_type  [ -drop_children_p drop_children_p ] \
        [ -drop_table_p drop_table_p ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -object_type
    (required)
    -drop_children_p
    (defaults to "f") (optional)
    -drop_table_p
    (defaults to "f") (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_object_type proc drop_type xo::db::sql::acs_object_type proc drop_type test_xotcl_core_tutorial_2->xo::db::sql::acs_object_type proc drop_type db_with_handle db_with_handle (public) xo::db::sql::acs_object_type proc drop_type->db_with_handle

    Testcases:
    xotcl_core_tutorial_2
    #function_args: {OBJECT_TYPE {}} {DROP_CHILDREN_P f} {DROP_TABLE_P f}
    foreach var [list OBJECT_TYPE DROP_CHILDREN_P DROP_TABLE_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__drop_type($_OBJECT_TYPE$_DROP_CHILDREN_P$_DROP_TABLE_P) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • is_subtype_p (scripted, public)

     xo::db::sql::acs_object_type[i] is_subtype_p [ -dbn dbn ] \
        -object_type_1 object_type_1  -object_type_2 object_type_2 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -object_type_1
    (required)
    -object_type_2
    (required)

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

    Testcases:
    No testcase defined.
    #function_args: {OBJECT_TYPE_1 {}} {OBJECT_TYPE_2 {}}
    foreach var [list OBJECT_TYPE_1 OBJECT_TYPE_2]  {
      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__is_subtype_p($_OBJECT_TYPE_1$_OBJECT_TYPE_2) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • pretty_name (scripted, public)

     xo::db::sql::acs_object_type[i] pretty_name [ -dbn dbn ] \
        -object_type object_type 

    Automatically generated method

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

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

    Testcases:
    No testcase defined.
    #function_args: {OBJECT_TYPE {}}
    foreach var [list OBJECT_TYPE]  {
      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__pretty_name($_OBJECT_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }