- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::sql::content_item
::xo::db::sql::content_item create ...
Defined in
Class Relations
::xo::db::Class create ::xo::db::sql::content_item \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
copy (scripted, public)
xo::db::sql::content_item 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)
- 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 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)
- 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 del [ -dbn dbn ] -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 delete [ -dbn dbn ] -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 edit_name [ -dbn dbn ] -item_id item_id \ -name nameAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -name (required)
- 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 generic_move [ -dbn dbn ] -item_id item_id \ -target_item_id target_item_id -name nameAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -target_item_id (required)
- -name (required)
- 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 get_best_revision [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 get_content_type [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 get_context [ -dbn dbn ] -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 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 (optional, defaults to
"f"
)- 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 get_latest_revision [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 get_live_revision [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 get_parent_folder [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 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)
- 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 get_publish_date [ -dbn dbn ] \ -item_id item_id [ -is_live is_live ]Automatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -is_live (optional, defaults to
"f"
)- 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 get_revision_count [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 get_root_folder [ -dbn dbn ] \ [ -item_id item_id ]Automatically generated method
- Switches:
- -dbn (optional)
- -item_id (optional)
- 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 get_template [ -dbn dbn ] -item_id item_id \ -use_context use_contextAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -use_context (required)
- 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 get_title [ -dbn dbn ] -item_id item_id \ [ -is_live is_live ]Automatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -is_live (optional, defaults to
"f"
)- 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 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 (optional)
- 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_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 is_index_page [ -dbn dbn ] -item_id item_id \ -folder_id folder_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -folder_id (required)
- 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 is_publishable [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 is_published [ -dbn dbn ] -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 is_subclass [ -dbn dbn ] \ -object_type object_type -supertype supertypeAutomatically generated method
- Switches:
- -dbn (optional)
- -object_type (required)
- -supertype (required)
- 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 is_valid_child [ -dbn dbn ] \ -item_id item_id -content_type content_type \ -relation_tag relation_tagAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -content_type (required)
- -relation_tag (required)
- 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 move [ -dbn dbn ] -item_id item_id \ -target_folder_id target_folder_id -name nameAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -target_folder_id (required)
- -name (required)
- 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 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 (optional, defaults to
"now"
)- -creation_user (optional)
- -context_id (optional)
- -creation_ip (optional)
- -item_subtype (optional, defaults to
"content_item"
)- -content_type (optional, defaults to
"content_revision"
)- -title (optional)
- -description (optional)
- -mime_type (optional, defaults to
"text/plain"
)- -nls_language (optional)
- -text (optional)
- -data (optional)
- -relation_tag (optional)
- -is_live (optional, defaults to
"f"
)- -storage_type (optional)
- -package_id (optional)
- -with_child_rels (optional, defaults to
"t"
)- -childof (optional)
- 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 register_template [ -dbn dbn ] \ -item_id item_id -template_id template_id \ -use_context use_contextAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -template_id (required)
- -use_context (required)
- 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 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 (optional, defaults to
"generic"
)- -order_n (optional)
- -relation_type (optional, defaults to
"cr_item_rel"
)- 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 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 (optional, defaults to
"ready"
)- -publish_date (optional, defaults to
"now()"
)- -is_latest (optional, defaults to
"f"
)- 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 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)
- 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 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)
- 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 unrelate [ -dbn dbn ] -rel_id rel_idAutomatically generated method
- Switches:
- -dbn (optional)
- -rel_id (required)
- 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 unset_live_revision [ -dbn dbn ] \ -item_id item_idAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- 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 write_to_file [ -dbn dbn ] -item_id item_id \ -root_path root_pathAutomatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -root_path (required)
- 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 ] }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables