etp::revision_datasource (public)

 etp::revision_datasource object_id

Defined in packages/edit-this-page/tcl/etp-sc-procs.tcl

Returns a search package compatible array

Parameters:
object_id (required)
Author:
Dave Bauer

Testcases:
No testcase defined.
Source code:
        
    db_0or1row revision_datasource ""     -column_array datasource
    set content_type [acs_object_type $object_id]
    
    ns_log debug "etp::revision_datasource: content_type=$content_type"
    # call a specially named proc to extend search content for
    # this content_type if it exists
    # we pass in the name of the tcl array for the datasource
    # which the proc can modify if it likes to add additional
    # content to be indexed.

    if {[info commands "etp::search::$content_type"] ne ""} {
    [etp::search::$content_type -array_name "datasource"]
    }

    return [array get datasource]
XQL Not present:
Oracle
Generic XQL file:
<fullquery name="etp::revision_datasource.revision_datasource">
    <querytext>
       	select r.revision_id as object_id,
	       r.title as title,
	       content as content,
	       'text/html' as mime,
	       '' as keywords,
	       'text' as storage_type
	from cr_revisions r
	       where revision_id = :object_id
      </querytext>
</fullquery>
packages/edit-this-page/tcl/etp-sc-procs.xql

PostgreSQL XQL file:
packages/edit-this-page/tcl/etp-sc-procs-postgresql.xql

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