What is the range of "values" in the SPARQL query graph

I have a query that includes many subqueries, which also includes some subqueries. I want to know the scope of the values ​​clause in a SPARQL query. Does it also fit subqueries?

If I defined a sentence of values ​​in a subquery and used the same variable in a request from fathers, will this variable have only the values ​​specified in the request for son? (and vice versa)?

I looked at the SPARQL 1.1 specification , but all I found is the following, which does not seem to answer my question:

The VALUES data block can be displayed in the query template or at the end of a SELECT query, including a subquery.

+4
source share
1

SPARQL . . :

select ?x ?y ?z {
  values ?x { "x" }

  { select (?x as ?y) ("z" as ?z) {} }
}
-----------------
| x   | y | z   |
=================
| "x" |   | "z" |
-----------------

? x, ? y "x", .

, , . , ? X ? Y, ? X:

select ?x ?y {
  {
    select ?x {
      values ?x { "x" }
      values ?y { "y" }
    }
  }
}
-----------
| x   | y |
===========
| "x" |   |
-----------

, . 18.2.1 . , , :

{P1 P2 & hellip; }: v , P1, P2, & hellip;

, { ... } , . "" , .

, , , values ​​, , , , , :

select ?x ?y ?yy {
  { select (?y as ?yy) {} }
}
values (?x ?y) { (1 2) }
  
--------------
| x | y | yy |
==============
| 1 | 2 |    |
--------------
+8

All Articles