Class ::xo::db::sql::image

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

Defined in

Class Relations

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

Methods (to be applied on the object)

  • delete (scripted, public)

     xo::db::sql::image[i] delete [ -dbn dbn ] -v_item_id v_item_id 

    Automatically generated method

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

    Testcases:
    No testcase defined.
    #function_args: {V_ITEM_ID {}}
    foreach var [list V_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 image__delete($_V_ITEM_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::image[i] new [ -dbn dbn ] -name name  \
        [ -parent_id parent_id ] [ -item_id item_id ] \
        [ -revision_id revision_id ] [ -mime_type mime_type ] \
        [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
        [ -relation_tag relation_tag ] [ -title title ] \
        [ -description description ] [ -is_live is_live ] \
        [ -publish_date publish_date ] -path path  -file_size file_size  \
        -height height  -width width  [ -package_id package_id ] \
        [ -childof childof ]

    Automatically generated method

    Switches:
    -dbn (optional)
    -name (required)
    -parent_id (optional)
    -item_id (optional)
    -revision_id (optional)
    -mime_type (optional, defaults to "jpeg")
    -creation_user (optional)
    -creation_ip (optional)
    -relation_tag (optional)
    -title (optional)
    -description (optional)
    -is_live (optional, defaults to "f")
    -publish_date (optional, defaults to "now()")
    -path (required)
    -file_size (required)
    -height (required)
    -width (required)
    -package_id (optional)
    -childof (optional)

    Testcases:
    No testcase defined.
    #function_args: {NAME {}} {PARENT_ID null} {ITEM_ID null} {REVISION_ID null} {MIME_TYPE jpeg} {CREATION_USER null} {CREATION_IP null} {RELATION_TAG null} {TITLE null} {DESCRIPTION null} {IS_LIVE f} {PUBLISH_DATE now()} {PATH {}} {FILE_SIZE {}} {HEIGHT {}} {WIDTH {}} {PACKAGE_ID null}
    foreach var [list NAME PARENT_ID ITEM_ID REVISION_ID MIME_TYPE CREATION_USER CREATION_IP RELATION_TAG TITLE DESCRIPTION IS_LIVE PUBLISH_DATE PATH FILE_SIZE HEIGHT WIDTH 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 image__new($_NAME$_PARENT_ID$_ITEM_ID$_REVISION_ID$_MIME_TYPE$_CREATION_USER$_CREATION_IP$_RELATION_TAG$_TITLE$_DESCRIPTION$_IS_LIVE$_PUBLISH_DATE$_PATH$_FILE_SIZE$_HEIGHT$_WIDTH$_PACKAGE_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • new_revision (scripted, public)

     xo::db::sql::image[i] new_revision [ -dbn dbn ] -item_id item_id  \
        -revision_id revision_id  -title title  -description description  \
        -publish_date publish_date  -mime_type mime_type  \
        -nls_language nls_language  -creation_user creation_user  \
        -creation_ip creation_ip  -height height  -width width  \
        -package_id package_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -revision_id (required)
    -title (required)
    -description (required)
    -publish_date (required)
    -mime_type (required)
    -nls_language (required)
    -creation_user (required)
    -creation_ip (required)
    -height (required)
    -width (required)
    -package_id (required)

    Testcases:
    No testcase defined.
    #function_args: {ITEM_ID {}} {REVISION_ID {}} {TITLE {}} {DESCRIPTION {}} {PUBLISH_DATE {}} {MIME_TYPE {}} {NLS_LANGUAGE {}} {CREATION_USER {}} {CREATION_IP {}} {HEIGHT {}} {WIDTH {}} {PACKAGE_ID {}}
    foreach var [list ITEM_ID REVISION_ID TITLE DESCRIPTION PUBLISH_DATE MIME_TYPE NLS_LANGUAGE CREATION_USER CREATION_IP HEIGHT WIDTH 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 image__new_revision($_ITEM_ID$_REVISION_ID$_TITLE$_DESCRIPTION$_PUBLISH_DATE$_MIME_TYPE$_NLS_LANGUAGE$_CREATION_USER$_CREATION_IP$_HEIGHT$_WIDTH$_PACKAGE_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }