goofballLogic / ld-query

Querying JSON-LD
MIT License
20 stars 6 forks source link

Documentation mentions 'attribute' clauses, but they do not appear to be implemented #5

Closed gareth-robinson closed 7 years ago

gareth-robinson commented 7 years ago

At the bottom of your Examples you list an example that has an attribute clause: doc.query("so:favouriteReads[@index=pynchon_gp] so:name @value") // "Gravity's Rainbow"

There does not appear to be any implementation for this though.

(also, as an aside, your 'main' entry in package.json is pointing to dist/ld-query.js, which does not exist)

goofballLogic commented 7 years ago

yes the attributes bit isn't implemented yet. needs a test or two based on the samples in the docs

gareth-robinson commented 7 years ago

I've submitted a pull request for this: https://github.com/goofballLogic/ld-query/pull/6. However, it was quite a big change, perhaps you had a different intention for how to solve this.

goofballLogic commented 7 years ago

@gareth-robinson note that I've added documentation to highlight that @id and @index are also considered to be "final" nodes that will return their string content when selected.

gareth-robinson commented 7 years ago

I've re-implemented this, hopefully a lot tidier. See pull request https://github.com/goofballLogic/ld-query/pull/9