content::revision::update_content-lob (private)

 content::revision::update_content-lob -item_id item_id \
    -revision_id revision_id -content content -mime_type mime_type \
    [ -tmp_filename tmp_filename ]

Defined in packages/acs-content-repository/tcl/content-revision-procs.tcl

Switches:
-item_id (required)
-revision_id (required)
-content (required)
-mime_type (required)
-tmp_filename (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 cr_create_content_file cr_create_content_file (public) db_dml db_dml (public) content::revision::update_content-lob content::revision::update_content-lob content::revision::update_content-lob->cr_create_content_file content::revision::update_content-lob->db_dml

Testcases:
No testcase defined.
Source code:
    if {$tmp_filename ne ""} {
        # handle file
        set filename [cr_create_content_file $item_id $revision_id $tmp_filename]
        db_dml set_content "" -blob_files [list $tmp_filename]
        db_dml set_size ""
    } else {
        # handle blob
        db_dml update_content "" -blobs [list $content]
    }
Generic XQL file:
packages/acs-content-repository/tcl/content-revision-procs.xql

PostgreSQL XQL file:
<fullquery name="content::revision::update_content-lob.set_content">
    <querytext>

	update cr_revisions
	set mime_type = :mime_type,
 	   lob = [set __lob_id [db_string get_lob_id {select empty_lob()}]]
	where revision_id = :revision_id
	   
      </querytext>
</fullquery>

<fullquery name="content::revision::update_content-lob.set_size">
    <querytext>

         update cr_revisions
         set content_length = lob_length(lob)
         where revision_id = :revision_id

      </querytext>
</fullquery>

<fullquery name="content::revision::update_content-lob.update_content">
    <querytext>
      update cr_revisions set content=:content where
      revision_id = :revision_id
    </querytext>
</fullquery>
packages/acs-content-repository/tcl/content-revision-procs-postgresql.xql

Oracle XQL file:
<fullquery name="content::revision::update_content-lob.update_content">
    <querytext>
        update cr_revisions
        set    content = empty_blob()
        where  revision_id = :revision_id
        returning content into :1
    </querytext>
</fullquery>

<fullquery name="content::revision::update_content-lob.set_size">
    <querytext>

         update cr_revisions
         set content_length = lob_length(lob)
         where revision_id = :revision_id

      </querytext>
</fullquery>

<fullquery name="content::revision::update_content-lob.set_content">
    <querytext>

        update cr_revisions
        set mime_type = :mime_type,
        content = empty_blob()
        where revision_id = :revision_id

      </querytext>
</fullquery>
packages/acs-content-repository/tcl/content-revision-procs-oracle.xql

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