Skip to content

Use of vocabulary-scoped identifiers in @values #77

@Peeja

Description

@Peeja

This looks like a bug to me, but I also could easily be misunderstanding the intended semantics. I'm not sure how to characterize it, so by all means, please retitle this issue if you can put it more usefully. 😃


Given the following data:

[
  {
    "@id": "http://www.example.com/foo",
    "aProperty": "existing-value"
  },
  {
    "@id": "http://www.example.com/bar",
    "aProperty": "another-existing-value"
  }
]

I expected the query:

{
  "@construct": {
    "@id": "?id",
    "?property": "?value"
  },
  "@where": {
    "@graph": {
      "@id": "?id",
      "?property": "?value"
    },
    "@values": [
      {
        "?id": "http://www.example.com/foo"
      }
    ]
  }
}

to return:

[
  {
    "@id": "http://www.example.com/foo",
    "aProperty": "existing-value"
  }
]

but instead it returns []. (playground)

A similar @select query also yields []. (playground)

For what it's worth, an empty @values successfully returns all of the data. (playground)


The use case here is that I'm trying to read all of the existing triples for properties that I'm about to write, so that I can @delete the old values when I @insert the new values. I should be able to do the same thing with a bunch of reads and put them together, but that seems odd (but might be what I'll do for now, at least).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions