%3 ::xotcl::Object ::xotcl::Object ::xo::db::sql::acs_util ::xo::db::sql::acs_util → boolean_query → has_children → sql_to_tcl_string ::xo::db::sql::acs_util->::xotcl::Object

Class ::xo::db::sql::acs_util

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

Defined in

Class Relations

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

Methods (to be applied on the object)

  • boolean_query (scripted, public)

     xo::db::sql::acs_util[i] boolean_query [ -dbn dbn ] -query_in query_in  \
        -not_flag_in not_flag_in 

    Automatically generated method

    Switches:
    -dbn (optional)
    -query_in (required)
    -not_flag_in (required)

    Testcases:
    No testcase defined.
    #function_args: {QUERY_IN {}} {NOT_FLAG_IN {}}
    foreach var [list QUERY_IN NOT_FLAG_IN]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select acs_util__boolean_query($_QUERY_IN$_NOT_FLAG_IN) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • has_children (scripted, public)

     xo::db::sql::acs_util[i] has_children [ -dbn dbn ] \
        -item_id_in item_id_in  -table_name_in table_name_in  \
        -parent_column_in parent_column_in 

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id_in (required)
    -table_name_in (required)
    -parent_column_in (required)

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID_IN {}} {TABLE_NAME_IN {}} {PARENT_COLUMN_IN {}}
    foreach var [list ITEM_ID_IN TABLE_NAME_IN PARENT_COLUMN_IN]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select acs_util__has_children($_ITEM_ID_IN$_TABLE_NAME_IN$_PARENT_COLUMN_IN) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • sql_to_tcl_string (scripted, public)

     xo::db::sql::acs_util[i] sql_to_tcl_string [ -dbn dbn ] \
        -string_in string_in 

    Automatically generated method

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

    Testcases:
    No testcase defined.
    #function_args: {STRING_IN {}}
    foreach var [list STRING_IN]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select acs_util__sql_to_tcl_string($_STRING_IN) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }