From 2589e75b924baa13e9b74965b62ede71e200af0f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 15 Oct 2012 09:55:09 -0400 Subject: [PATCH] Added test data stored proc comments Signed-off-by: Bill Erickson --- Open-ILS/tests/datasets/sql/env_create.sql | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 2.11.0