[open-ils-commits] r9244 - in branches/rel_1_2/Open-ILS: src/sql/Pg
web/reports web/reports/xul
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 7 11:33:47 EDT 2008
Author: miker
Date: 2008-04-07 10:56:47 -0400 (Mon, 07 Apr 2008)
New Revision: 9244
Modified:
branches/rel_1_2/Open-ILS/src/sql/Pg/002.functions.config.sql
branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js
branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js
Log:
add "first word" support -- use for callnumber prefix
Modified: branches/rel_1_2/Open-ILS/src/sql/Pg/002.functions.config.sql
===================================================================
--- branches/rel_1_2/Open-ILS/src/sql/Pg/002.functions.config.sql 2008-04-07 14:25:02 UTC (rev 9243)
+++ branches/rel_1_2/Open-ILS/src/sql/Pg/002.functions.config.sql 2008-04-07 14:56:47 UTC (rev 9244)
@@ -38,5 +38,9 @@
SELECT * FROM biblio_field_table( $1, ARRAY[$2] )
$_$ LANGUAGE SQL;
+CREATE OR REPLACE FUNCTION public.first_word ( TEXT ) RETURNS TEXT AS $$
+ SELECT SUBSTRING( $1 FROM $_$^\S+$_$);
+$$ LANGUAGE SQL;
+
COMMIT;
Modified: branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 14:25:02 UTC (rev 9243)
+++ branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 14:56:47 UTC (rev 9244)
@@ -56,6 +56,11 @@
label : 'First 5 characters (for US ZIP code)'
},
+ first_word : {
+ datatype : [OILS_RPT_DTYPE_STRING, 'text'],
+ label : 'First contiguous non-space string'
+ },
+
/* timestamp transforms ----------------------- */
dow : {
datatype : OILS_RPT_DTYPE_TIMESTAMP,
Modified: branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js 2008-04-07 14:25:02 UTC (rev 9243)
+++ branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js 2008-04-07 14:56:47 UTC (rev 9244)
@@ -93,6 +93,11 @@
label : 'First 5 characters (for US ZIP code)'
},
+ first_word : {
+ datatype : [OILS_RPT_DTYPE_STRING, 'text'],
+ label : 'First contiguous non-space string'
+ },
+
/* timestamp transforms ----------------------- */
dow : {
datatype : [ OILS_RPT_DTYPE_TIMESTAMP ],
More information about the open-ils-commits
mailing list