Name

DB.DBA.GROUP_DIGEST — returns an arbitrary value from the multiset passed to it.

Synopsis

DB.DBA.GROUP_DIGEST ( in token varchar ,
in delim varchar ,
in maxlen integer ,
in mode integer );

Description

DB.DBA.GROUP_DIGEST is aggregate function that performs a string concatenation across the values of an expression with a group. The order of the strings is not specified. The separator character used in the concatenation may be given with the scalar argument delimiter. The function is an extended version of sql:GROUP_CONCAT(), with two more arguments: maxlen and mode.

Note: the "sql:" prefix is mandatory when this aggregate is used in SPARQL queries. In SQL queries the prefix is "DB.DBA".

Parameters

token

An item that should be added to a delimited list.

delim

The delimeter character to be used in the concatenation.

maxlen

The maximal allowed length of the result, in characters. Redundant values will be ignored. If the last value does not fit in the "maxlen" entirely, then it can be truncated and "..." is placed at the end of the resulting string.

mode

Bitmask of properties. Right now only bit 1 is used and others are reserved. If the value of the argument is 1 then duplicate values are ignored; value 0 will put duplicate values like in case of sql:GROUP_CONCAT ().

Return Types

any

Examples

Example24.289.Get all ?assets as a list with delimiters.

SQL>SPARQL
SELECT ?view (sql:GROUP_DIGEST (?path, ' ', 1000, 1)) as ?path_list
    (sql:GROUP_DIGEST (?asset, ' ', 1000, 1)) as ?asset_list
FROM <http://mygraph.com>
WHERE
  {
    ?view <viewPath> ?path ;
      <viewContent> ?asset ;
      <viewType>  'phyview'.
  };