%3 ::xotcl::Object ::xotcl::Object ::xo::db::sql::content_template ::xo::db::sql::content_template → del → delete → get_path → get_root_folder → is_template → new ::xo::db::sql::content_template->::xotcl::Object

Class ::xo::db::sql::content_template

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

Class Relations

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

Methods (to be applied on the object)

  • del (scripted, public)

     xo::db::sql::content_template[i] del [ -dbn dbn ] \
        -template_id template_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_template[i] delete [ -dbn dbn ] \
        -template_id template_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_template[i] get_path [ -dbn dbn ] \
        -template_id template_id  [ -root_folder_id root_folder_id ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -template_id
    (required)
    -root_folder_id
    (defaults to "content_template_globals.c_root_folder_id") (optional)

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

    Testcases:
    No testcase defined.
    #function_args: {TEMPLATE_ID {}} {ROOT_FOLDER_ID content_template_globals.c_root_folder_id}
    foreach var [list TEMPLATE_ID ROOT_FOLDER_ID]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_template__get_path($_TEMPLATE_ID$_ROOT_FOLDER_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_root_folder (scripted, public)

     xo::db::sql::content_template[i] get_root_folder [ -dbn dbn ]

    Automatically generated method

    Switches:
    -dbn
    (optional)

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

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

     xo::db::sql::content_template[i] is_template [ -dbn dbn ] \
        -template_id template_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_template[i] new [ -dbn dbn ] -name name  \
        [ -parent_id parent_id ] [ -template_id template_id ] \
        [ -creation_date creation_date ] [ -creation_user creation_user ] \
        [ -creation_ip creation_ip ] [ -text text ] [ -is_live is_live ] \
        [ -childof childof ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -name
    (required)
    -parent_id
    (optional)
    -template_id
    (optional)
    -creation_date
    (defaults to "now") (optional)
    -creation_user
    (optional)
    -creation_ip
    (optional)
    -text
    (optional)
    -is_live
    (defaults to "f") (optional)
    -childof
    (optional)

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

    Testcases:
    No testcase defined.
    #function_args: {NAME {}} {PARENT_ID null} {TEMPLATE_ID null} {CREATION_DATE now} {CREATION_USER null} {CREATION_IP null} {TEXT null} {IS_LIVE f}
    foreach var [list NAME PARENT_ID TEMPLATE_ID CREATION_DATE CREATION_USER CREATION_IP TEXT IS_LIVE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_template__new($_NAME$_PARENT_ID$_TEMPLATE_ID$_CREATION_DATE$_CREATION_USER$_CREATION_IP$_TEXT$_IS_LIVE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }