From: Bill Erickson Date: Mon, 15 Oct 2012 13:55:09 +0000 (-0400) Subject: Added test data stored proc comments X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2589e75b924baa13e9b74965b62ede71e200af0f;p=working%2FEvergreen.git Added test data stored proc comments Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/tests/datasets/sql/env_create.sql b/Open-ILS/tests/datasets/sql/env_create.sql index cfdb77356d..c1234423eb 100644 --- a/Open-ILS/tests/datasets/sql/env_create.sql +++ b/Open-ILS/tests/datasets/sql/env_create.sql @@ -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)