photo_album::search::album::datasource (private)
photo_album::search::album::datasource album_id
Defined in packages/photo-album/tcl/photo-album-search-procs.tcl
return the indexable content for an album. can index a revision_id or a cr_item.item_id for photo_album
- Parameters:
- album_id (required)
- the item_id or revision id to index.
- Author:
- Jeff Davis davis@xarg.net
- Created:
- 2004-06-01
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # get the best revision to show if it's an item_id otherwise assume we got a pa_album revision. set revision_id [db_string best_revision {select coalesce(live_revision, latest_revision) from cr_items where item_id = :album_id} -default $album_id] db_0or1row album_datasource { select r.title, r.title || ' ' || r.description || ' ' || a.story || ' photographer: ' || a.photographer as content, 'text/html' as mime, '' as keywords, 'text' as storage_type from cr_revisions r, pa_albums a where r.revision_id = :revision_id and a.pa_album_id = r.revision_id } -column_array datasource set datasource(object_id) $album_id return [array get datasource]XQL Not present: Generic, PostgreSQL, Oracle