Class ::xo::db::sql::news

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

Defined in

Class Relations

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

Methods (to be applied on the object)

  • archive (scripted, public)

     xo::db::sql::news[i] archive [ -dbn dbn ] -item_id item_id  \
        [ -archive_date archive_date ]

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -archive_date (optional, defaults to "current_timestamp")

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

     xo::db::sql::news[i] clone [ -dbn dbn ] -old_package_id old_package_id  \
        -new_package_id new_package_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -old_package_id (required)
    -new_package_id (required)

    Testcases:
    No testcase defined.
    #function_args: {OLD_PACKAGE_ID {}} {NEW_PACKAGE_ID {}}
    foreach var [list OLD_PACKAGE_ID NEW_PACKAGE_ID]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select news__clone($_OLD_PACKAGE_ID$_NEW_PACKAGE_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::news[i] delete [ -dbn dbn ] -item_id item_id 

    Automatically 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 news__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 ]
    }
  • make_permanent (scripted, public)

     xo::db::sql::news[i] make_permanent [ -dbn dbn ] -item_id item_id 

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

     xo::db::sql::news[i] name [ -dbn dbn ] -news_id news_id 

    Automatically generated method

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

    Testcases:
    No testcase defined.
    #function_args: {NEWS_ID {}}
    foreach var [list NEWS_ID]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select news__name($_NEWS_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::news[i] new [ -dbn dbn ] [ -item_id item_id ] \
        [ -locale locale ] [ -publish_date publish_date ] [ -text text ] \
        [ -nls_language nls_language ] [ -title title ] \
        [ -mime_type mime_type ] [ -package_id package_id ] \
        [ -archive_date archive_date ] [ -approval_user approval_user ] \
        [ -approval_date approval_date ] [ -approval_ip approval_ip ] \
        [ -relation_tag relation_tag ] [ -creation_ip creation_ip ] \
        [ -creation_user creation_user ] [ -is_live_p is_live_p ] \
        -lead lead  [ -childof childof ]

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (optional)
    -locale (optional)
    -publish_date (optional)
    -text (optional)
    -nls_language (optional)
    -title (optional)
    -mime_type (optional, defaults to "text/plain")
    -package_id (optional)
    -archive_date (optional)
    -approval_user (optional)
    -approval_date (optional)
    -approval_ip (optional)
    -relation_tag (optional)
    -creation_ip (optional)
    -creation_user (optional)
    -is_live_p (optional, defaults to "f")
    -lead (required)
    -childof (optional)

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID null} {LOCALE null} {PUBLISH_DATE null} {TEXT null} {NLS_LANGUAGE null} {TITLE null} {MIME_TYPE text/plain} {PACKAGE_ID null} {ARCHIVE_DATE null} {APPROVAL_USER null} {APPROVAL_DATE null} {APPROVAL_IP null} {RELATION_TAG null} {CREATION_IP null} {CREATION_USER null} {IS_LIVE_P f} {LEAD {}}
    foreach var [list ITEM_ID LOCALE PUBLISH_DATE TEXT NLS_LANGUAGE TITLE MIME_TYPE PACKAGE_ID ARCHIVE_DATE APPROVAL_USER APPROVAL_DATE APPROVAL_IP RELATION_TAG CREATION_IP CREATION_USER IS_LIVE_P LEAD]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select news__new($_ITEM_ID$_LOCALE$_PUBLISH_DATE$_TEXT$_NLS_LANGUAGE$_TITLE$_MIME_TYPE$_PACKAGE_ID$_ARCHIVE_DATE$_APPROVAL_USER$_APPROVAL_DATE$_APPROVAL_IP$_RELATION_TAG$_CREATION_IP$_CREATION_USER$_IS_LIVE_P$_LEAD) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • revision_delete (scripted, public)

     xo::db::sql::news[i] revision_delete [ -dbn dbn ] \
        -revision_id revision_id 

    Automatically generated method

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

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

     xo::db::sql::news[i] revision_new [ -dbn dbn ] -item_id item_id  \
        [ -publish_date publish_date ] [ -text text ] -title title  \
        -description description  [ -mime_type mime_type ] \
        [ -package_id package_id ] [ -archive_date archive_date ] \
        [ -approval_user approval_user ] [ -approval_date approval_date ] \
        [ -approval_ip approval_ip ] [ -creation_date creation_date ] \
        [ -creation_ip creation_ip ] [ -creation_user creation_user ] \
        [ -make_active_revision_p make_active_revision_p ] -lead lead 

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -publish_date (optional)
    -text (optional)
    -title (required)
    -description (required)
    -mime_type (optional, defaults to "text/plain")
    -package_id (optional)
    -archive_date (optional)
    -approval_user (optional)
    -approval_date (optional)
    -approval_ip (optional)
    -creation_date (optional, defaults to "current_timestamp")
    -creation_ip (optional)
    -creation_user (optional)
    -make_active_revision_p (optional, defaults to "f")
    -lead (required)

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}} {PUBLISH_DATE null} {TEXT null} {TITLE {}} {DESCRIPTION {}} {MIME_TYPE text/plain} {PACKAGE_ID null} {ARCHIVE_DATE null} {APPROVAL_USER null} {APPROVAL_DATE null} {APPROVAL_IP null} {CREATION_DATE current_timestamp} {CREATION_IP null} {CREATION_USER null} {MAKE_ACTIVE_REVISION_P f} {LEAD {}}
    foreach var [list ITEM_ID PUBLISH_DATE TEXT TITLE DESCRIPTION MIME_TYPE PACKAGE_ID ARCHIVE_DATE APPROVAL_USER APPROVAL_DATE APPROVAL_IP CREATION_DATE CREATION_IP CREATION_USER MAKE_ACTIVE_REVISION_P LEAD]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select news__revision_new($_ITEM_ID$_PUBLISH_DATE$_TEXT$_TITLE$_DESCRIPTION$_MIME_TYPE$_PACKAGE_ID$_ARCHIVE_DATE$_APPROVAL_USER$_APPROVAL_DATE$_APPROVAL_IP$_CREATION_DATE$_CREATION_IP$_CREATION_USER$_MAKE_ACTIVE_REVISION_P$_LEAD) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • revision_set_active (scripted, public)

     xo::db::sql::news[i] revision_set_active [ -dbn dbn ] \
        -revision_id revision_id 

    Automatically generated method

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

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

     xo::db::sql::news[i] set_approve [ -dbn dbn ] -revision_id revision_id  \
        [ -approve_p approve_p ] [ -publish_date publish_date ] \
        [ -archive_date archive_date ] [ -approval_user approval_user ] \
        [ -approval_date approval_date ] [ -approval_ip approval_ip ] \
        [ -live_revision_p live_revision_p ]

    Automatically generated method

    Switches:
    -dbn (optional)
    -revision_id (required)
    -approve_p (optional, defaults to "t")
    -publish_date (optional)
    -archive_date (optional)
    -approval_user (optional)
    -approval_date (optional, defaults to "current_timestamp")
    -approval_ip (optional)
    -live_revision_p (optional, defaults to "t")

    Testcases:
    No testcase defined.
    #function_args: {REVISION_ID {}} {APPROVE_P t} {PUBLISH_DATE null} {ARCHIVE_DATE null} {APPROVAL_USER null} {APPROVAL_DATE current_timestamp} {APPROVAL_IP null} {LIVE_REVISION_P t}
    foreach var [list REVISION_ID APPROVE_P PUBLISH_DATE ARCHIVE_DATE APPROVAL_USER APPROVAL_DATE APPROVAL_IP LIVE_REVISION_P]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select news__set_approve($_REVISION_ID$_APPROVE_P$_PUBLISH_DATE$_ARCHIVE_DATE$_APPROVAL_USER$_APPROVAL_DATE$_APPROVAL_IP$_LIVE_REVISION_P) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • status (scripted, public)

     xo::db::sql::news[i] status [ -dbn dbn ] -publish_date publish_date  \
        -archive_date archive_date 

    Automatically generated method

    Switches:
    -dbn (optional)
    -publish_date (required)
    -archive_date (required)

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