Array functionality

Is the Array functionality not available anymore?

SELECT * {
?person :date ?bdate .
{ SELECT ?person (array(?child, ?date) AS ?children) {
?person :hasChild ?child .
?child :birthDate ?date
}
GROUP BY ?person
}
}

I get a query eval error.

The only thing I can think of is the set() function. However, set() is an internals-oriented function that returns an encoded form using internal ids. Maybe you can use something like group_concat()?

I think the question was about the array() functionality proposed here https://www.stardog.com/blog/extending-the-solution/ back in Feb 2017, which AFAIK was never released. Is it planned to be?

Yes, it is on the roadmap but without a specific target date. It's been originally proposed in the context of path queries however we've been able to release path queries without functions over paths. We're still collecting data on how people use path queries to prioritise future directions.

As Jess pointed out, the most closely related functionality that is available now is group_concat.

Cheers,
Pavel

I included a couple if array functions in the strings plugin I released

The intent was to make it a little easier to deal with string arrays and avoid exploding the array if it wasn’t necessary. It just uses the ascii record separator so it’s only good for strings. It doesn’t do anything more than you could do with concat and group_concat but would be hopefully cleaner.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.