Models and controllers for III Sierra Postgresql database backend
Ruby HTML JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/models
bin
config
lib
test
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
active_sierra.gemspec

README.md

ActiveSierra

A Rails engine with models for the Innovative Interfaces Inc. Sierra integrated library system Postgresql database backend.

Installation

Add this line to your application's Gemfile:

gem 'active_sierra'

And then execute:

$ bundle

Or install it yourself as:

$ gem install active_sierra

Additionally, add 'sierra' to your config/database.yml, to connect to your local database:

sierra:
    adapter: postgresql
    database: iii
    host: your_database_url
    port: your_database_port
    schema_search_path: sierra_view
    pool: 5
    timeout: 5000
    username: your_username
    password: your_password
    sslmode: require

Usage

The engine provides models for major records types in the Sierra database, per the SierraDNA documentation (authentication required).

Record models currently include:

  • BibView
  • ItemView
  • OrderView
  • VarfieldViews
  • Subfields

BibRecord, ItemRecord, and OrderRecord are also included because they respond more quickly to certain queries

Relationships between records are included, e.g.:

b = BibView.first
i = b.item_views
b = i.bib_views ## Returns all attached bib records (items can have more than one attached bib record)
o = OrderView.first
b = o.bib_view ## Returns single attached bib record (orders, and checkins can only have one attached bib)

All records have attached variable fields, expressed through the VarfieldViews model:

v = b.varfield_views

And variable fields each have sub-fields:

v.subfields

The *View/*Record types also have creation\deletion data in an associated table:

b.record_metadata