Class ::xo::db::sql::content_item

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

Class Relations

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

Methods (to be applied on the object)

  • copy (scripted, public)

     xo::db::sql::content_item[i] copy [ -dbn dbn ] -item_id item_id  \
        -target_folder_id target_folder_id  -creation_user creation_user  \
        [ -creation_ip creation_ip ] [ -name name ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -target_folder_id
    (required)
    -creation_user
    (required)
    -creation_ip
    (optional)
    -name
    (optional)

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}} {TARGET_FOLDER_ID {}} {CREATION_USER {}} {CREATION_IP null} {NAME null}
    foreach var [list ITEM_ID TARGET_FOLDER_ID CREATION_USER CREATION_IP NAME]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_item__copy($_ITEM_ID$_TARGET_FOLDER_ID$_CREATION_USER$_CREATION_IP$_NAME) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • copy2 (scripted, public)

     xo::db::sql::content_item[i] copy2 [ -dbn dbn ] -item_id item_id  \
        -target_folder_id target_folder_id  -creation_user creation_user  \
        [ -creation_ip creation_ip ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -target_folder_id
    (required)
    -creation_user
    (required)
    -creation_ip
    (optional)

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

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

     xo::db::sql::content_item[i] del [ -dbn dbn ] -item_id item_id 

    Automatically generated method

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

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}}
    foreach var [list ITEM_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_item__del($_ITEM_ID) FOR UPDATE
        "
    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_item[i] delete [ -dbn dbn ] -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] edit_name [ -dbn dbn ] -item_id item_id  \
        -name name 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -name
    (required)

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

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

     xo::db::sql::content_item[i] generic_move [ -dbn dbn ] -item_id item_id  \
        -target_item_id target_item_id  -name name 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -target_item_id
    (required)
    -name
    (required)

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

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

     xo::db::sql::content_item[i] get_best_revision [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] get_content_type [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] get_context [ -dbn dbn ] -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] get_id [ -dbn dbn ] -item_path item_path  \
        [ -root_folder_id root_folder_id ] \
        [ -resolve_index resolve_index ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_path
    (required)
    -root_folder_id
    (optional)
    -resolve_index
    (defaults to "f") (optional)

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

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

     xo::db::sql::content_item[i] get_latest_revision [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] get_live_revision [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] get_parent_folder [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}}
    foreach var [list ITEM_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_item__get_parent_folder($_ITEM_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_item[i] get_path [ -dbn dbn ] -item_id item_id  \
        [ -root_folder_id root_folder_id ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -root_folder_id
    (optional)

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}} {ROOT_FOLDER_ID null}
    foreach var [list ITEM_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_item__get_path($_ITEM_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_publish_date (scripted, public)

     xo::db::sql::content_item[i] get_publish_date [ -dbn dbn ] \
        -item_id item_id  [ -is_live is_live ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -is_live
    (defaults to "f") (optional)

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

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

     xo::db::sql::content_item[i] get_revision_count [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}}
    foreach var [list ITEM_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_item__get_revision_count($_ITEM_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_item[i] get_root_folder [ -dbn dbn ] \
        [ -item_id item_id ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (optional)

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

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

     xo::db::sql::content_item[i] get_template [ -dbn dbn ] -item_id item_id  \
        -use_context use_context 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -use_context
    (required)

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

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

     xo::db::sql::content_item[i] get_title [ -dbn dbn ] -item_id item_id  \
        [ -is_live is_live ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -is_live
    (defaults to "f") (optional)

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

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

     xo::db::sql::content_item[i] get_virtual_path [ -dbn dbn ] \
        -item_id item_id  [ -root_folder_id root_folder_id ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -root_folder_id
    (defaults to "-100") (optional)

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}} {ROOT_FOLDER_ID -100}
    foreach var [list ITEM_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_item__get_virtual_path($_ITEM_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 ]
    }
  • is_index_page (scripted, public)

     xo::db::sql::content_item[i] is_index_page [ -dbn dbn ] -item_id item_id  \
        -folder_id folder_id 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -folder_id
    (required)

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

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

     xo::db::sql::content_item[i] is_publishable [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] is_published [ -dbn dbn ] -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] is_subclass [ -dbn dbn ] \
        -object_type object_type  -supertype supertype 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] is_valid_child [ -dbn dbn ] \
        -item_id item_id  -content_type content_type  \
        -relation_tag relation_tag 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -content_type
    (required)
    -relation_tag
    (required)

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

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

     xo::db::sql::content_item[i] move [ -dbn dbn ] -item_id item_id  \
        -target_folder_id target_folder_id  -name name 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -target_folder_id
    (required)
    -name
    (required)

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}} {TARGET_FOLDER_ID {}} {NAME {}}
    foreach var [list ITEM_ID TARGET_FOLDER_ID NAME]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_item__move($_ITEM_ID$_TARGET_FOLDER_ID$_NAME) 
        "
    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_item[i] new [ -dbn dbn ] -name name  \
        [ -parent_id parent_id ] [ -item_id item_id ] [ -locale locale ] \
        [ -creation_date creation_date ] [ -creation_user creation_user ] \
        [ -context_id context_id ] [ -creation_ip creation_ip ] \
        [ -item_subtype item_subtype ] [ -content_type content_type ] \
        [ -title title ] [ -description description ] \
        [ -mime_type mime_type ] [ -nls_language nls_language ] \
        [ -text text ] [ -data data ] [ -relation_tag relation_tag ] \
        [ -is_live is_live ] [ -storage_type storage_type ] \
        [ -package_id package_id ] [ -with_child_rels with_child_rels ] \
        [ -childof childof ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -name
    (required)
    -parent_id
    (optional)
    -item_id
    (optional)
    -locale
    (optional)
    -creation_date
    (defaults to "now") (optional)
    -creation_user
    (optional)
    -context_id
    (optional)
    -creation_ip
    (optional)
    -item_subtype
    (defaults to "content_item") (optional)
    -content_type
    (defaults to "content_revision") (optional)
    -title
    (optional)
    -description
    (optional)
    -mime_type
    (defaults to "text/plain") (optional)
    -nls_language
    (optional)
    -text
    (optional)
    -data
    (optional)
    -relation_tag
    (optional)
    -is_live
    (defaults to "f") (optional)
    -storage_type
    (optional)
    -package_id
    (optional)
    -with_child_rels
    (defaults to "t") (optional)
    -childof
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_xotcl_core_tutorial_4 xotcl_core_tutorial_4 (test xotcl-core) xo::db::sql::content_item proc new xo::db::sql::content_item proc new test_xotcl_core_tutorial_4->xo::db::sql::content_item proc new db_with_handle db_with_handle (public) xo::db::sql::content_item proc new->db_with_handle

    Testcases:
    xotcl_core_tutorial_4
    #function_args: {NAME {}} {PARENT_ID null} {ITEM_ID null} {LOCALE null} {CREATION_DATE now} {CREATION_USER null} {CONTEXT_ID null} {CREATION_IP null} {ITEM_SUBTYPE content_item} {CONTENT_TYPE content_revision} {TITLE null} {DESCRIPTION null} {MIME_TYPE text/plain} {NLS_LANGUAGE null} {TEXT null} {DATA null} {RELATION_TAG null} {IS_LIVE f} {STORAGE_TYPE null} {PACKAGE_ID null} {WITH_CHILD_RELS t}
    foreach var [list NAME PARENT_ID ITEM_ID LOCALE CREATION_DATE CREATION_USER CONTEXT_ID CREATION_IP ITEM_SUBTYPE CONTENT_TYPE TITLE DESCRIPTION MIME_TYPE NLS_LANGUAGE TEXT DATA RELATION_TAG IS_LIVE STORAGE_TYPE PACKAGE_ID WITH_CHILD_RELS]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_item__new($_NAME$_PARENT_ID$_ITEM_ID$_LOCALE$_CREATION_DATE$_CREATION_USER$_CONTEXT_ID$_CREATION_IP$_ITEM_SUBTYPE$_CONTENT_TYPE$_TITLE$_DESCRIPTION$_MIME_TYPE$_NLS_LANGUAGE$_TEXT$_DATA$_RELATION_TAG$_IS_LIVE$_STORAGE_TYPE$_PACKAGE_ID$_WITH_CHILD_RELS) FOR UPDATE
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • register_template (scripted, public)

     xo::db::sql::content_item[i] register_template [ -dbn dbn ] \
        -item_id item_id  -template_id template_id  \
        -use_context use_context 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] relate [ -dbn dbn ] -item_id item_id  \
        -object_id object_id  [ -relation_tag relation_tag ] \
        [ -order_n order_n ] [ -relation_type relation_type ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -object_id
    (required)
    -relation_tag
    (defaults to "generic") (optional)
    -order_n
    (optional)
    -relation_type
    (defaults to "cr_item_rel") (optional)

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

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}} {OBJECT_ID {}} {RELATION_TAG generic} {ORDER_N null} {RELATION_TYPE cr_item_rel}
    foreach var [list ITEM_ID OBJECT_ID RELATION_TAG ORDER_N RELATION_TYPE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_item__relate($_ITEM_ID$_OBJECT_ID$_RELATION_TAG$_ORDER_N$_RELATION_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • set_live_revision (scripted, public)

     xo::db::sql::content_item[i] set_live_revision [ -dbn dbn ] \
        -revision_id revision_id  [ -publish_status publish_status ] \
        [ -publish_date publish_date ] [ -is_latest is_latest ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -revision_id
    (required)
    -publish_status
    (defaults to "ready") (optional)
    -publish_date
    (defaults to "now()") (optional)
    -is_latest
    (defaults to "f") (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_xotcl_core_tutorial_4 xotcl_core_tutorial_4 (test xotcl-core) xo::db::sql::content_item proc set_live_revision xo::db::sql::content_item proc set_live_revision test_xotcl_core_tutorial_4->xo::db::sql::content_item proc set_live_revision db_with_handle db_with_handle (public) xo::db::sql::content_item proc set_live_revision->db_with_handle

    Testcases:
    xotcl_core_tutorial_4
    #function_args: {REVISION_ID {}} {PUBLISH_STATUS ready} {PUBLISH_DATE now()} {IS_LATEST f}
    foreach var [list REVISION_ID PUBLISH_STATUS PUBLISH_DATE IS_LATEST]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_item__set_live_revision($_REVISION_ID$_PUBLISH_STATUS$_PUBLISH_DATE$_IS_LATEST) FOR NO KEY UPDATE
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • set_release_period (scripted, public)

     xo::db::sql::content_item[i] set_release_period [ -dbn dbn ] \
        -item_id item_id  [ -start_when start_when ] \
        [ -end_when end_when ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -start_when
    (optional)
    -end_when
    (optional)

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

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

     xo::db::sql::content_item[i] unregister_template [ -dbn dbn ] \
        -item_id item_id  [ -template_id template_id ] \
        [ -use_context use_context ]

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] unrelate [ -dbn dbn ] -rel_id rel_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] unset_live_revision [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

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

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

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

     xo::db::sql::content_item[i] write_to_file [ -dbn dbn ] -item_id item_id  \
        -root_path root_path 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -item_id
    (required)
    -root_path
    (required)

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

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