pa_insert_image (public)

 pa_insert_image name photo_id item_id rev_id user_id peeraddr \
    context_id title description mime_type relation is_live path \
    height width size

Defined in packages/photo-album/tcl/photo-album-procs.tcl

Parameters:
name (required)
photo_id (required)
item_id (required)
rev_id (required)
user_id (required)
peeraddr (required)
context_id (required)
title (required)
description (required)
mime_type (required)
relation (required)
is_live (required)
path (required)
height (required)
width (required)
size (required)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_insert_image pa_insert_image pa_load_images->pa_insert_image ad_conn ad_conn (public) pa_insert_image->ad_conn db_exec_plsql db_exec_plsql (public) pa_insert_image->db_exec_plsql

Testcases:
No testcase defined.
Source code:
 
    if { [ad_conn isconnected] } {
        set package_id [ad_conn package_id]
    } else {
        set package_id ""
    }
    db_exec_plsql pa_insert_image {}
Generic XQL file:
packages/photo-album/tcl/photo-album-procs.xql

PostgreSQL XQL file:
<fullquery name="pa_insert_image.pa_insert_image">
    <querytext>
        select image__new (
          :name, -- name
          :photo_id, -- parent_id
          :item_id, -- item_id
          :rev_id, -- revision_id
          :mime_type, -- mime_type
          :user_id, -- creation_user
          :peeraddr, -- creation_ip
          :relation, -- relation_tag
          :title, -- title
          :description, -- description
          :is_live, -- is_live
          current_timestamp, -- publish_date
          :path, -- path
          :size, -- file_size
          :height, -- height
          :width, -- width
          :package_id
        )    
      </querytext>
</fullquery>
packages/photo-album/tcl/photo-album-procs-postgresql.xql

Oracle XQL file:
<fullquery name="pa_insert_image.pa_insert_image">
    <querytext>
      
        declare 
            dummy  integer;
        begin

        dummy := image.new (
            name            => :name,
            parent_id       => :photo_id,
            item_id         => :item_id,
            revision_id     => :rev_id,
            mime_type       => :mime_type,
            creation_user   => :user_id,
            creation_ip     => :peeraddr,
            relation_tag    => :relation,
            title           => :title,
            description     => :description,
            is_live         => :is_live,
            file_size       => :size,
            filename        => :path,
            height          => :height,
            width           => :width,
            context_id      => :context_id,
            package_id      => :package_id
        );
        end;
    
      </querytext>
</fullquery>
packages/photo-album/tcl/photo-album-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: