irc-logger-procs.xql

DB Query file

Related Files

[ hide source ] | [ make this the default ]

File Contents

<?xml version="1.0"?>
<!-- @arch-tag: d9fe2de1-6a8b-40e5-b9b9-135babf269bb -->
<queryset>

  <partialquery name="irc::logger::rotate_logs.i1_criteria">
    <querytext>
      (i1.content_type <> 'content_extlink' or
	i1.content_type is null)
    </querytext>
  </partialquery>

  <partialquery name="irc::logger::rotate_logs.i2_criteria">
    <querytext>
      (i2.content_type <> 'content_extlink' or
	i2.content_type is null)
    </querytext>
  </partialquery>

  <fullquery name="irc::logger::rotate_logs.shift">
    <querytext>
      update cr_items 
      set tree_sortkey = :next_sortkey
      where item_id = :item_id
    </querytext>
  </fullquery>
  
  <fullquery name="irc::logger::update_log.get_extlink">
    <querytext>
      select extlink_id 
      from cr_extlinks e, cr_items i, cr_folders f
      where i.item_id = e.extlink_id
      and i.parent_id = f.folder_id
      and f.package_id = :parent_package_id
      and e.label = 'current'
    </querytext>
  </fullquery>

  <fullquery name="irc::logger::update_log.update_extlink">
    <querytext>
      update cr_extlinks
      set url = :log_url
      where extlink_id = :extlink_id
    </querytext>
  </fullquery>

  <fullquery name="irc::logger::update_log.update_revision">
    <querytext>
      update cr_revisions 
      set description = :log_description, content = :irc_html_log, mime_type = 'text/html'
      where revision_id = :log_live_revision_id
    </querytext>
  </fullquery>

</queryset>