Re: [Virtuoso-users] VSP and Sparql use VPL variables in query.

2009-11-30 Thread Ivan Mikhailov
Lourens > My first intuition would say that a sparql query containing > > { _:hidden_bnode skos:prefLabel ?v1_lab . > FILTER (_:hidden_bnode = iri(?:_uri)) } > > could be inefficient. Will Virtuoso internally optimize this into a query > equivalent to { $:some_uri skos:prefLabel ?v1_lab. } ?

Re: [Virtuoso-users] VSP and Sparql use VPL variables in query.

2009-11-30 Thread Lourens van der Meij
Thanks, Ivan. My first intuition would say that a sparql query containing { _:hidden_bnode skos:prefLabel ?v1_lab . FILTER (_:hidden_bnode = iri(?:_uri)) } could be inefficient. Will Virtuoso internally optimize this into a query equivalent to { $:some_uri skos:prefLabel ?v1_lab. } ? Lourens

Re: [Virtuoso-users] VSP and Sparql use VPL variables in query.

2009-11-30 Thread Ivan Mikhailov
Lourens, I gues that this will work: CREATE PROCEDURE VAS_PROPERTY_LABEL (in _uri varchar) { for (sparql select ?v1_lab where { `iri(?:_uri)` skos:prefLabel ?v1_lab}) do { RETURN "v1_lab"; } RETURN _uri; } Colon in ?:_uri indicates an external variable, iri() con

[Virtuoso-users] VSP and Sparql use VPL variables in query.

2009-11-29 Thread Lourens van der Meij
Thanks for solving my previous problem. Next, I am looking at creating procedures. I somehow do not manage to use VPL variables in sparql queries: CREATE PROCEDURE VAS_PROPERTY_LABEL (in _uri varchar) { for (sparql select ?v1_lab where { _uri skos:prefLabel ?v1_lab}) do {