Re: Combined grammar (work in progress)

One thing, all aggregates are supposed to be able to have DISTINCT as  
a flag, I don't think this is possible with the draft grammar.

Also, for completeness, maybe we should have ALL, as the opposite,  
which is the default (as per SQL)?

What about user-defined aggregates too? Can't see them.

It seems a bit odd that COUNT() only takes Var, not Expression.  
COUNT(expr) is potentially useful, eg.

COUNT(?x && ?y)    # count rows where both ?x and ?y are defined.

- Steve

On 16 Mar 2010, at 10:54, Andy Seaborne wrote:

> I'd taken a pass at a complete grammar for SPARQL 1.1
>
> http://www.w3.org/2009/sparql/docs/sparql-grammar-11.html
>
> and attached.
>
> **
> Would someone with the power please enable public access to this file?
> (chairs, team).  I can't set the access control on it.
>
> Paul - I have tried to add the current update forms as I remember  
> them.  Please can you let me know what I have got wrong from where  
> you are planning on going with the update doc.  I have added Steve's  
> suggestion of DEFAULT as I understood it (never use absence, always  
> use DEFAULT, to refer tot the default graph).
>
> 	Andy
>
> The following are the current test cases: this is a woefully  
> incomplete set of tests:  more test cases very welcome.
>
>
> (empty string)
>
> LOAD <foo> INTO <blah>
>
> LOAD <foo1> <foo2> INTO <blah>
>
> LOAD <foo> INTO DEFAULT
>
> LOAD <foo>
>
> CLEAR  DEFAULT
>
> CLEAR <g>
>
> DROP <g>
>
> CREATE <g>
>
> INSERT DATA { <X> <p> 123 }
>
> WITH <x> INSERT DATA { <X> <p> 123 }
>
> WITH <x> INSERT DATA
> {
>  <X> <p> 123
>  GRAPH <g> { <x1> <p1> 456 . }
> }
>
>
> WITH <x> INSERT DATA {
>   <X> <p> 123
>   GRAPH <g> { <x1> <p1> 456 . }
>   GRAPH <g> {<X> <p> 123 }
> }
>
> DELETE WHERE { ?x ?p ?o }
>
> WITH <x> DELETE WHERE { ?x ?p ?o }
>
> DELETE WHERE { GRAPH <g> { ?x ?p ?o } }
>
> DELETE { ?x ?p ?o } WHERE { GRAPH <g> { ?x ?p ?o } }
>
> DELETE { ?x ?p ?o } INSERT { ?x ?p ?o } WHERE { GRAPH <g> { ?x ?p ? 
> o } }
>
> INSERT { ?x ?p ?o } WHERE { GRAPH <g> { ?x ?p ?o } }
>
> CREATE <g> CLEAR <G>  LOAD <data> INTO <G> WITH <x> DELETE WHERE { ? 
> x ?p ?o }
>
> CREATE <g> ; CLEAR <G> ; LOAD <data> INTO <G> ; WITH <x> DELETE  
> WHERE { ?x ?p ?o }
>
> <sparql-grammar-11.html>

-- 
Steve Harris, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44 20 8973 2465  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10  
9AD

Received on Tuesday, 16 March 2010 13:47:39 UTC