content::item::content_is_null (public)

 content::item::content_is_null revision_id

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

Determines if the content for the revision is null (not mereley zero-length)

Parameters:
revision_id (required)
The revision id
Returns:
1 if the content is null, 0 otherwise

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::content_is_null content::item::content_is_null test_content_item->content::item::content_is_null db_string db_string (public) content::item::content_is_null->db_string publish::write_content publish::write_content (public) publish::write_content->content::item::content_is_null

Testcases:
content_item
Source code:
    set content_test [db_string cin_get_content {} -default ""]

    return [expr {$content_test eq ""}]
Generic XQL file:
packages/acs-content-repository/tcl/content-item-procs.xql

PostgreSQL XQL file:
<fullquery name="content::item::content_is_null.cin_get_content">
    <querytext>
      select 't' from cr_revisions r, cr_items i
      where r.revision_id = :revision_id
      and i.item_id = r.item_id
      and ((r.content is not null and i.storage_type in ('text','file')) or
      (r.lob is not null and i.storage_type = 'lob'))
    </querytext>
</fullquery>
packages/acs-content-repository/tcl/content-item-procs-postgresql.xql

Oracle XQL file:
<fullquery name="content::item::content_is_null.cin_get_content">
    <querytext>
      select 't' from cr_revisions r, cr_items i
      where r.revision_id = :revision_id
      and i.item_id = r.item_id
      and ((r.content is not null and i.storage_type in ('lob','text')) or
      (r.filename is not null and i.storage_type = 'file'))
    </querytext>
</fullquery>
packages/acs-content-repository/tcl/content-item-procs-oracle.xql

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