Added test data stored proc comments
authorBill Erickson <berick@esilibrary.com>
Mon, 15 Oct 2012 13:55:09 +0000 (09:55 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 15 Oct 2012 13:55:09 +0000 (09:55 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/tests/datasets/sql/env_create.sql

index cfdb773..c123442 100644 (file)
@@ -1,5 +1,9 @@
 CREATE TABLE marcxml_import (marc TEXT);
 
+/**
+ * create a callnumber for every bib record in the database,
+ * appending the bib ID to the callnumber label to differentiate.
+ */
 CREATE FUNCTION evergreen.populate_call_number (ownlib INTEGER, label TEXT)
 RETURNS void AS $$
     INSERT INTO asset.call_number (record, creator, editor, owning_lib, label, label_class)
@@ -8,6 +12,10 @@ RETURNS void AS $$
         WHERE id > 0;
 $$ LANGUAGE SQL;
 
+/*
+ * create a copy for every callnumber in the database whose label and owninb_lib 
+ * matches, appending the callnumber ID to the copy barcode to differentate.
+ */
 CREATE FUNCTION evergreen.populate_copy (circlib INTEGER, ownlib INTEGER, barcode TEXT, label TEXT)
 RETURNS void AS $$
     INSERT INTO asset.copy (call_number, circ_lib, creator, editor, loan_duration, fine_level, barcode)