sub is_aggregate { return 1 }
+#-------------------------------------------------------------------------------------------------
+package OpenILS::Reporter::SQLBuilder::Column::Transform::string_agg;
+
+sub toSQL {
+ my $self = shift;
+ return 'STRING_AGG(DISTINCT nullif("' . $self->{_relation} . '"."' . $self->name . '"::text,\'\'),\',\')';
+}
+
+sub is_aggregate { return 1 }
#-------------------------------------------------------------------------------------------------
package OpenILS::Reporter::SQLBuilder::Column::Where;
s.TFORMS_LABEL_MONTHS_AGO = '[% l( "Months ago") %]';
s.TFORMS_LABEL_QUARTERS_AGO = '[% l( "Quarters ago") %]';
s.TFORMS_LABEL_SUM = '[% l( "Sum") %]';
+s.TFORMS_LABEL_STRING_AGG = '[% l( "String Aggregate") %]';
s.TFORMS_LABEL_AVERAGE = '[% l( "Average") %]';
s.TFORMS_LABEL_ROUND = '[% l( "Round") %]';
s.TFORMS_LABEL_INT = '[% l( "Drop trailing decimals") %]';
s.TRANSFORMS_MONTHS_AGO = '[% l( "Months ago") %]';
s.TRANSFORMS_QUARTERS_AGO = '[% l( "Quarters ago") %]';
s.TRANSFORMS_SUM = '[% l( "Sum") %]';
+s.TRANSFORMS_STRING_AGG = '[% l( "String Aggregate") %]';
s.TRANSFORMS_AVERAGE = '[% l( "Average") %]';
s.TRANSFORMS_ROUND = '[% l( "Round") %]';
s.TRANSFORMS_INT = '[% l( "Drop trailing decimals") %]';
"TFORMS_LABEL_MONTHS_AGO": "Months ago",
"TFORMS_LABEL_QUARTERS_AGO": "Quarters ago",
"TFORMS_LABEL_SUM": "Sum",
+ "TFORMS_LABEL_STRING_AGG": "String Aggregate",
"TFORMS_LABEL_AVERAGE": "Average",
"TFORMS_LABEL_ROUND": "Round",
"TFORMS_LABEL_INT": "Drop trailing decimals",
"TRANSFORMS_MONTHS_AGO": "Months ago",
"TRANSFORMS_QUARTERS_AGO": "Quarters ago",
"TRANSFORMS_SUM": "Sum",
+ "TRANSFORMS_STRING_AGG": "String Aggregate",
"TRANSFORMS_AVERAGE": "Average",
"TRANSFORMS_ROUND": "Round",
"TRANSFORMS_INT": "Drop trailing decimals"
aggregate : true,
label : egCore.strings.TRANSFORMS_MAX
},
-
+
+ string_agg : {
+ datatype : OILS_RPT_DTYPE_NOT_BOOL,
+ label : egCore.strings.TRANSFORMS_STRING_AGG,
+ aggregate : true
+ },
/* string transforms ------------------------- */
substring : {
aggregate : true,
label : rpt_strings.TFORMS_LABEL_MAX
},
+
+ string_agg : {
+ aggregate : true,
+ label : rpt_strings.TFORMS_STRING_AGG
+ },
/* string transforms ------------------------- */
label : rpt_strings.TRANSFORMS_MAX
},
+ string_agg : {
+ datatype : OILS_RPT_DTYPE_NOT_BOOL,
+ label : rpt_strings.TRANSFORMS_STRING_AGG,
+ aggregate : true
+ },
/* string transforms ------------------------- */
substring : {
msgid "Max"
msgstr "Max"
+#: reports.js:TFORMS_LABEL_STRING_AGG reports.js:TRANSFORMS_STRING_AGG
+msgid "String Aggregate"
+msgstr "String Aggregate"
+
#: reports.js:TEMPLATE_CONF_NOT_IN reports.js:TEMPLATE_CONF_NO_MATCH
msgid "Field does not match one of list (comma separated):"
msgstr "Field does not match one of list (comma separated):"
msgid "Max"
msgstr "Max"
+#: reports.js:TFORMS_LABEL_STRING_AGG reports.js:TRANSFORMS_STRING_AGG
+msgid "String Aggregate"
+msgstr "String Aggregate"
+
#: reports.js:TEMPLATE_CONF_NOT_IN reports.js:TEMPLATE_CONF_NO_MATCH
msgid "Field does not match one of list (comma separated):"
msgstr "Field does not match one of list (comma separated):"
msgid "Max"
msgstr ""
+#: reports.js:TFORMS_LABEL_STRING_AGG reports.js:TRANSFORMS_STRING_AGG
+msgid "String Aggregate"
+msgstr ""
+
#: reports.js:TFORMS_LABEL_LOWER reports.js:TRANSFORMS_LOWER
msgid "Lower case"
msgstr ""