Add "concatenate_unique" as aggregate parameter

to relation_aggregate function
This commit is contained in:
Harrissou Sant-anna 2019-09-19 17:52:05 +02:00 committed by Nyall Dawson
parent ef11da6359
commit 575ecffe30

View File

@ -4,7 +4,7 @@
"description": "Returns an aggregate value calculated using all matching child features from a layer relation.",
"arguments": [
{"arg":"relation", "description":"a string, representing a relation ID"},
{"arg":"aggregate", "description":"a string corresponding to the aggregate to calculate. Valid options are:<br /><ul><li>count</li><li>count_distinct</li><li>count_missing</li><li>min</li><li>max</li><li>sum</li><li>mean</li><li>median</li><li>stdev</li><li>stdevsample</li><li>range</li><li>minority</li><li>majority</li><li>q1: first quartile</li><li>q3: third quartile</li><li>iqr: inter quartile range</li><li>min_length: minimum string length</li><li>max_length: maximum string length</li><li>concatenate: join strings with a concatenator</li><li>collect: multipart geometry</li><li>array_agg: aggregated values</li></ul>"},
{"arg":"aggregate", "description":"a string corresponding to the aggregate to calculate. Valid options are:<br /><ul><li>count</li><li>count_distinct</li><li>count_missing</li><li>min</li><li>max</li><li>sum</li><li>mean</li><li>median</li><li>stdev</li><li>stdevsample</li><li>range</li><li>minority</li><li>majority</li><li>q1: first quartile</li><li>q3: third quartile</li><li>iqr: inter quartile range</li><li>min_length: minimum string length</li><li>max_length: maximum string length</li><li>concatenate: join strings with a concatenator</li><li>concatenate_unique: join unique strings with a concatenator</li><li>collect: create an aggregated multipart geometry</li><li>array_agg: create an array of aggregated values</li></ul>"},
{"arg":"expression", "description":"sub expression or field name to aggregate"},
{"arg":"concatenator", "optional":true, "description":"optional string to use to join values for 'concatenate' aggregate"},
{"arg":"filter", "optional":true, "description":"optional filter expression to order the features used for calculating the aggregate. Fields and geometry are from the features on the joined layer."}
@ -15,4 +15,4 @@
{ "expression":"relation_aggregate('my_relation','concatenate', \"towns\", concatenator:=',')", "returns":"comma separated list of the towns field for all matching child features using the 'my_relation' relation"},
{ "expression":"relation_aggregate('my_relation','array_agg', \"id\")", "returns":"array of the id field from all matching child features using the 'my_relation' relation"}
]
}
}