Class: UwCatalog::VoyagerSql
- Inherits:
-
Object
- Object
- UwCatalog::VoyagerSql
- Defined in:
- lib/uw_catalog/voyager_sql.rb
Class Method Summary collapse
- .get_bibliographic_sql ⇒ Object
- .get_holdings_with_items_sql ⇒ Object
- .get_holdings_without_items_sql ⇒ Object
- .get_issues_recieved_sql ⇒ Object
- .get_marc_stream_sql ⇒ Object
Class Method Details
.get_bibliographic_sql ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/uw_catalog/voyager_sql.rb', line 5 def self.get_bibliographic_sql() "select distinct bib_text.bib_id as bibid, bib_text.author as author, bib_text.title_brief as title, " + "bib_text.edition, bib_text.pub_place, bib_text.publisher as publisher, bib_text.publisher_date as publish_date " + "from bib_text, bib_mfhd, mfhd_master, location " + "where bib_text.bib_id=? " + "and bib_text.bib_id=bib_mfhd.bib_id " + "and bib_mfhd.mfhd_id=mfhd_master.mfhd_id " + "and mfhd_master.location_id=location.location_id " + "and location.suppress_in_opac='N'" end |
.get_holdings_with_items_sql ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/uw_catalog/voyager_sql.rb', line 16 def self.get_holdings_with_items_sql() "select distinct mfhd_master.mfhd_id as holding_id," + "mfhd_master.location_id, " + "hloc.location_display_name as location," + "item.temp_location as temp_location_id," + "iloc.location_display_name as temp_location," + "mfhd_master.display_call_no," + "mfhd_item.item_enum," + "item.item_id, " + "item.copy_number," + "item.on_reserve, " + "item.item_type_id," + "item_barcode.item_barcode, " + "item_status.item_status, " + "item_status.item_status_date," + "circ_transactions.current_due_date, " + "hold_recall_items.hold_recall_status_date " + "from bib_mfhd, mfhd_master, location hloc, location iloc, mfhd_item, item, item_status, item_barcode " + ", circ_transactions, hold_recall_items " + "where bib_mfhd.bib_id=? " + "and bib_mfhd.mfhd_id=mfhd_master.mfhd_id " + "and mfhd_master.suppress_in_opac='N' " + "and mfhd_master.location_id=hloc.location_id " + "and hloc.suppress_in_opac='N' " + "and mfhd_master.mfhd_id=mfhd_item.mfhd_id " + "and mfhd_item.item_id=item.item_id " + "and item.temp_location=iloc.location_id (+) " + "and item.item_id=item_status.item_id " + "and item.item_id=item_barcode.item_id " + "and item_barcode.barcode_status=1 " + "and item.item_id=circ_transactions.item_id (+) " + "and item.item_id=hold_recall_items.item_id (+) " end |
.get_holdings_without_items_sql ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/uw_catalog/voyager_sql.rb', line 50 def self.get_holdings_without_items_sql() "select distinct mfhd_master.mfhd_id as holding_id," + "mfhd_master.location_id, " + "location.location_display_name as location," + "null as temp_location_id," + "null as temp_location," + "mfhd_master.display_call_no," + "null as item_enum, " + "null as item_id, " + "null as copy_number, " + "null as perm_location, " + "null as temp_location, " + "null as on_reserve, " + "null as item_type_id," + "null as item_barcode, " + "null as item_status, " + "null as item_sequence_number," + "null as item_status_date," + "null as current_due_date, " + "null as hold_recall_status_date " + "from bib_mfhd, mfhd_master, location " + "where bib_mfhd.bib_id=? " + "and bib_mfhd.mfhd_id=mfhd_master.mfhd_id " + "and mfhd_master.location_id=location.location_id " + "and mfhd_master.suppress_in_opac='N' " + "and location.suppress_in_opac='N' " + "and not exists (select 'x' from mfhd_item mi where mi.mfhd_id = mfhd_master.mfhd_id)" end |
.get_issues_recieved_sql ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/uw_catalog/voyager_sql.rb', line 79 def self.get_issues_recieved_sql() "select serial_issues.enumchron " + "from line_item_copy_status " + "inner join subscription on line_item_copy_status.line_item_id = subscription.line_item_id " + "inner join component on subscription.subscription_id = component.subscription_id " + "inner join serial_issues on component.component_id = serial_issues.component_id " + "inner join issues_received on issues_received.issue_id = serial_issues.issue_id " + "and component.component_id = issues_received.component_id " + "where line_item_copy_status.mfhd_id = ? " + "and component.category = ? " + "and serial_issues.received = 1 " + "and issues_received.opac_suppressed = 1" end |
.get_marc_stream_sql ⇒ Object
93 94 95 96 97 |
# File 'lib/uw_catalog/voyager_sql.rb', line 93 def self.get_marc_stream_sql() "select mfhd_data.record_segment from mfhd_master, mfhd_data " + "where mfhd_master.mfhd_id=? " + "and mfhd_master.mfhd_id = mfhd_data.mfhd_id" end |