zazuko / rdf-cube-view-query

RDF Cube View Schema query library
2 stars 3 forks source link

feat: optional query-prefix for each query operation. #81

Closed cristianvasquez closed 2 years ago

cristianvasquez commented 2 years ago

https://github.com/zazuko/rdf-cube-view-query/issues/80

All query operations accept an optional queryPrefix, it defaults to DESCRIBE when retrieving documents and no join hash to Observations

cristianvasquez commented 2 years ago

@tpluscode, thanks for the review! the change makes sense, and it's pushed now.

bergos commented 2 years ago

@cristianvasquez I think it would be better to add the prefix to the query object. There is a new v0.1.10 version of the query builder that supports queryPrefix: https://github.com/rdf-ext/rdf-sparql-builder/pull/17/files

cristianvasquez commented 2 years ago

@cristianvasquez I think it would be better to add the prefix to the query object. There is a new v0.1.10 version of the query builder that supports queryPrefix: https://github.com/rdf-ext/rdf-sparql-builder/pull/17/files

That's perfect!, will do

cristianvasquez commented 2 years ago

well, not that perfect when I start using it :); this forces me to add the prefix to all querybuilders, whereas adding a prefix to the source centralizes this. What do you think @bergos, @tpluscode ?

cristianvasquez commented 2 years ago

I discovered I also need to change the queries for 'Cube.js'. (pushed).

Regarding all comments, I see two options:

1. Select prefix in each query individually through QueryBuilder

2. Select prefix in source:

I'm inclined to 2, primarily to deliver this specific functionality soon.

cristianvasquez commented 2 years ago

Not related at all with this pull request, but just to share my current criterion to use or not Query-Builder. (I don't know much about it)

bergos commented 2 years ago

2. Select prefix in source:

* _Pros_

  * Less code to maintain

* _Cons_

  * No granularity, all prefixes the same

I'm inclined to 2, primarily to deliver this specific functionality soon.

:+1: