Class ::xo::db::sql::acs_object_util

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

Defined in

Class Relations

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

Methods (to be applied on the object)

  • get_object_type (scripted, public)

     xo::db::sql::acs_object_util[i] get_object_type [ -dbn dbn ] \
        -object_id object_id 

    Automatically generated method

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

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

     xo::db::sql::acs_object_util[i] object_ancestor_type_p [ -dbn dbn ] \
        -object_id object_id  -object_type object_type 

    Automatically generated method

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

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

     xo::db::sql::acs_object_util[i] object_type_exist_p [ -dbn dbn ] \
        -object_type object_type 

    Automatically generated method

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

    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_util__object_type_exist_p($_OBJECT_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • object_type_p (scripted, public)

     xo::db::sql::acs_object_util[i] object_type_p [ -dbn dbn ] \
        -object_id object_id  -object_type object_type 

    Automatically generated method

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

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

     xo::db::sql::acs_object_util[i] type_ancestor_type_p [ -dbn dbn ] \
        -object_type1 object_type1  -object_type2 object_type2 

    Automatically generated method

    Switches:
    -dbn (optional)
    -object_type1 (required)
    -object_type2 (required)

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