Closed vhf closed 5 years ago
Sure, I could implement it on Dimension/Attribute/Measure and we'd use it like this:
myDimension.values()
Turns out values depend on the data cube so I came up with a different API:
Could you please comment on that @ktk @herrstucki @lucguillemot?
Awesome, looks good to me!
I wonder if additionally adding the possibility to add this to queries as well would be possible (like i described in https://github.com/zazuko/query-rdf-data-cube/issues/20#issuecomment-530817209):
// All dimension values of a cube
await cube.componentValues(myDimension) // => [1,2,3,4,5]
// Construct query without executing
const query = cube.query().filter(something)
// All dimension values of this query
await query.componentValues(myDimension) // => [3,5]
Sounds like something useful, I'll try to implement it and come back to you for feedback on the API, it might diverge a bit from your example.
@vhf lgtm, if it's useful for IXT I'm good :)
Fixes #20
TODO:
try to be smart about it