Class ::xo::db::sql::pa_album

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

Defined in

Class Relations

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

Methods (to be applied on the object)

  • delete (scripted, public)

     xo::db::sql::pa_album[i] delete [ -dbn dbn ] -album_id album_id 

    Automatically generated method

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

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

     xo::db::sql::pa_album[i] delete_revision [ -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 pa_album__delete_revision($_REVISION_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::pa_album[i] new [ -dbn dbn ] -name name  -album_id album_id  \
        [ -parent_id parent_id ] [ -is_live is_live ] \
        [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
        [ -title title ] [ -description description ] [ -story story ] \
        [ -photographer photographer ] [ -revision_id revision_id ] \
        [ -creation_date creation_date ] [ -locale locale ] \
        [ -context_id context_id ] [ -publish_date publish_date ] \
        [ -nls_language nls_language ] [ -childof childof ]

    Automatically generated method

    Switches:
    -dbn (optional)
    -name (required)
    -album_id (required)
    -parent_id (optional)
    -is_live (optional, defaults to "f")
    -creation_user (optional)
    -creation_ip (optional)
    -title (optional)
    -description (optional)
    -story (optional, defaults to "null ")
    -photographer (optional, defaults to "null ")
    -revision_id (optional)
    -creation_date (optional, defaults to "now()")
    -locale (optional)
    -context_id (optional)
    -publish_date (optional, defaults to "now()")
    -nls_language (optional)
    -childof (optional)

    Testcases:
    No testcase defined.
    #function_args: {NAME {}} {ALBUM_ID {}} {PARENT_ID null} {IS_LIVE f} {CREATION_USER null} {CREATION_IP null} {TITLE null} {DESCRIPTION null} {STORY {null    }} {PHOTOGRAPHER {null    }} {REVISION_ID null} {CREATION_DATE now()} {LOCALE null} {CONTEXT_ID null} {PUBLISH_DATE now()} {NLS_LANGUAGE null}
    foreach var [list NAME ALBUM_ID PARENT_ID IS_LIVE CREATION_USER CREATION_IP TITLE DESCRIPTION STORY PHOTOGRAPHER REVISION_ID CREATION_DATE LOCALE CONTEXT_ID PUBLISH_DATE NLS_LANGUAGE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select pa_album__new($_NAME$_ALBUM_ID$_PARENT_ID$_IS_LIVE$_CREATION_USER$_CREATION_IP$_TITLE$_DESCRIPTION$_STORY$_PHOTOGRAPHER$_REVISION_ID$_CREATION_DATE$_LOCALE$_CONTEXT_ID$_PUBLISH_DATE$_NLS_LANGUAGE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }