<?xml version="1.0" encoding="UTF-8"?><database name="egdb3_14_1" schema="oai" type="PostgreSQL - 15.10 (Ubuntu 15.10-1.pgdg24.04+1)">
   <tables>
      <table name="authority" numRows="0" remarks="" schema="oai" type="VIEW" viewSql=" SELECT are.id AS rec_id,&#10;    (are.edit_date AT TIME ZONE 'UTC'::text) AS datestamp,&#10;    are.deleted&#10;   FROM authority.record_entry are&#10;  ORDER BY are.id;">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="rec_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="1" name="datestamp" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="deleted" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
      </table>
      <table name="biblio" numRows="0" remarks="" schema="oai" type="VIEW" viewSql=" SELECT bre.id AS rec_id,&#10;    (bre.edit_date AT TIME ZONE 'UTC'::text) AS datestamp,&#10;    bre.deleted&#10;   FROM biblio.record_entry bre&#10;  ORDER BY bre.id;">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="rec_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="1" name="datestamp" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="deleted" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
      </table>
   </tables>
   <routines>
      <routine dataAccess="MODIFIES" deterministic="false" name="auth_is_visible_by_axis(auth bigint, ax text)" returnType="boolean" securityType="INVOKER" type="FUNCTION">
         <comment/>
         <definition language="sql"><![CDATA[SELECT EXISTS (SELECT 1 FROM authority.browse_axis_authority_field_map m JOIN authority.simple_heading r on (r.atag = m.field AND r.record = auth AND m.axis = ax))]]></definition>
         <parameters>
            <parameter mode="IN" name="auth" type="bigint"/>
            <parameter mode="IN" name="ax" type="text"/>
         </parameters>
      </routine>
      <routine dataAccess="MODIFIES" deterministic="false" name="bib_is_visible_at_org_by_copy(bib bigint, org integer)" returnType="boolean" securityType="INVOKER" type="FUNCTION">
         <comment/>
         <definition language="sql"><![CDATA[WITH corgs AS (SELECT array_agg(id) AS list FROM actor.org_unit_descendants(org))
  SELECT EXISTS (SELECT 1 FROM asset.copy_vis_attr_cache, corgs WHERE vis_attr_vector @@ search.calculate_visibility_attribute_test('circ_lib', corgs.list)::query_int AND bib=record)]]></definition>
         <parameters>
            <parameter mode="IN" name="bib" type="bigint"/>
            <parameter mode="IN" name="org" type="integer"/>
         </parameters>
      </routine>
      <routine dataAccess="MODIFIES" deterministic="false" name="bib_is_visible_at_org_by_luri(bib bigint, org integer)" returnType="boolean" securityType="INVOKER" type="FUNCTION">
         <comment/>
         <definition language="sql"><![CDATA[WITH lorgs AS(SELECT array_agg(id) AS list FROM actor.org_unit_ancestors(org))
  SELECT EXISTS (SELECT 1 FROM biblio.record_entry, lorgs WHERE vis_attr_vector @@ search.calculate_visibility_attribute_test('luri_org', lorgs.list)::query_int AND bib=id)]]></definition>
         <parameters>
            <parameter mode="IN" name="bib" type="bigint"/>
            <parameter mode="IN" name="org" type="integer"/>
         </parameters>
      </routine>
      <routine dataAccess="MODIFIES" deterministic="false" name="bib_is_visible_by_source(bib bigint, src text)" returnType="boolean" securityType="INVOKER" type="FUNCTION">
         <comment/>
         <definition language="sql"><![CDATA[SELECT EXISTS (SELECT 1 FROM biblio.record_entry b JOIN config.bib_source s ON (b.source = s.id) WHERE transcendant AND s.source = src AND bib=b.id)]]></definition>
         <parameters>
            <parameter mode="IN" name="bib" type="bigint"/>
            <parameter mode="IN" name="src" type="text"/>
         </parameters>
      </routine>
   </routines>
</database>
