]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/600.schema.oai.sql
LP#1729620 Cleanup, fix bugs
[working/Evergreen.git] / Open-ILS / src / sql / Pg / 600.schema.oai.sql
1 -- VIEWS for the oai service
2 CREATE SCHEMA oai;
3
4 -- The view presents a lean table with unique bre.tc-numbers for oai paging;
5 CREATE VIEW oai.biblio AS
6   SELECT
7     bre.id                             AS rec_id,
8     bre.edit_date                      AS datestamp,
9     bre.deleted                        AS deleted
10   FROM
11     biblio.record_entry bre
12   ORDER BY
13     bre.id;
14
15 -- The view presents a lean table with unique are.tc-numbers for oai paging;
16 CREATE VIEW oai.authority AS
17   SELECT
18     are.id               AS rec_id,
19     are.edit_date        AS datestamp,
20     are.deleted          AS deleted
21   FROM
22     authority.record_entry AS are
23   ORDER BY
24     are.id;
25