[Mulgara-dev] ITQL
Paul Gearon
gearon at ieee.org
Sat Jul 12 20:28:30 UTC 2008
On Sat, Jul 12, 2008 at 3:06 PM, Seaborne, Andy <andy.seaborne at hp.com> wrote:
>> In TQL there are no pre-imposed bindings for "x" in the expression
>> ".....IN $x". You can add these bindings, but if you don't, you'll get
>> every graph you know about. You can even get $x from another
>> constraint. While SPARQL allows you to get "x" from a constraint, it
>> is intersected with the list in FROM GRAPH.
>
> This is not how it is in SPARQL. You're mixing up queries with FROM NAMED and queries without.
>
> ?x ranges over the dataset names - all graph names in scope.
>
> FROM NAMED may have created a scope with certain names, but FROM NAMED is not necessary in a query anyway.
>
> Just query with
>
> SELECT ?g { GRAPH ?g { ?s ?p ?o } }
>
> All names of graphs.
It's interesting you would say this. I wondered about this in the
past, and wasn't satisfied that it was allowed. Also, when I wrote my
email this morning, then I looked it up again (so I didn't look like
an idiot - as I am wont to do) and again, I wasn't satisfied that it
was allowed.
Admittedly, at the top of section 8 there is the line: "The GRAPH
keyword is used to make the active graph one of all of the named
graphs in the dataset for part of the query."
However, all subsequent subsections and examples use GRAPH either with
an explicit URI, or in the context of one or more FROM NAMED graphs.
It makes it appear that "in the dataset" refers to that set explicitly
defined by FROM and FROM NAMED, rather than the complete set mentioned
3 paragraphs before.
Rigorously parsing each word and phrase in the sentences of that part
of the spec does imply what you have stated, but the style of the spec
does not seem to be such that rigorous parsing is appropriate. Then
when the case I'm referring to is not explained or given an example,
then it appears to be an option that is not catered for.
I can't remember what I did if GRAPH is used on a variable when there
are no named graphs, and the variable is otherwise unbound. The
default action in Mulgara would be to return all graphs, but it's
possible I went to a lot of effort to "make sure" it wouldn't. :-)
Paul
More information about the Mulgara-dev
mailing list