[open-ils-commits] r8907 - in branches/rel_1_2/Open-ILS: examples
src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 7 17:10:09 EST 2008
Author: miker
Date: 2008-03-07 16:37:28 -0500 (Fri, 07 Mar 2008)
New Revision: 8907
Modified:
branches/rel_1_2/Open-ILS/examples/fm_IDL.xml
branches/rel_1_2/Open-ILS/src/sql/Pg/090.schema.action.sql
Log:
circs by circ mod view
Modified: branches/rel_1_2/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/rel_1_2/Open-ILS/examples/fm_IDL.xml 2008-03-07 21:07:15 UTC (rev 8906)
+++ branches/rel_1_2/Open-ILS/examples/fm_IDL.xml 2008-03-07 21:37:28 UTC (rev 8907)
@@ -1049,6 +1049,19 @@
<link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
</links>
</class>
+ <class id="aoccbcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count_by_circ_mod" oils_persist:tablename="action.open_circ_count_by_circ_mod">
+ <fields>
+ <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+ <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+ <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+ <field name="circ_modifier" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="text"/>
+ <field name="count" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="int" />
+ <field name="usr" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="link" />
+ </fields>
+ <links>
+ <link field="usr" reltype="has_a" key="id" map="" class="au"/>
+ </links>
+ </class>
<class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item">
<fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
<field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
Modified: branches/rel_1_2/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- branches/rel_1_2/Open-ILS/src/sql/Pg/090.schema.action.sql 2008-03-07 21:07:15 UTC (rev 8906)
+++ branches/rel_1_2/Open-ILS/src/sql/Pg/090.schema.action.sql 2008-03-07 21:37:28 UTC (rev 8907)
@@ -108,7 +108,17 @@
CREATE INDEX circ_circ_lib_idx ON "action".circulation (circ_lib);
CREATE INDEX circ_open_date_idx ON "action".circulation (xact_start) WHERE xact_finish IS NULL;
+CREATE OR REPLACE VIEW action.open_circ_count_by_circ_mod AS
+ SELECT circ.usr,
+ cp.circ_modifier,
+ count(circ.id)
+ FROM action.circulation circ
+ JOIN asset.copy cp ON (circ.target_copy = cp.id)
+ WHERE circ.checkin_time IS NULL
+ AND ( circ.stop_fines IN ('LOST','LONGOVERDUE','CLAIMSRETURNED') OR circ.stop_fines IS NULL )
+ GROUP BY 1;
+
CREATE OR REPLACE VIEW action.open_circulation AS
SELECT *
FROM action.circulation
More information about the open-ils-commits
mailing list