On 25/11/11 06:12, ajaz shaik wrote:
Dear all,
I have a small question in query execution factory method . Sorry If its a
repeated question.
static public QueryExecution create(Query query, Dataset dataset, QuerySolution
initialBinding)
Should the initial binding, bind all the variables present in the current query
which is passed?
It can bind some or all of the variables in the query to be executed.
"some" is more common.
Think of it as simply replacing each variable with it's value in the
binding and then execution the query.
(That is a good mental model ... because that is exactly how it works!
It rewrites the query with the initialBinding as replacements)
Example:
I have an initial query
select ?films where { ?film rdf:type movie:film . Filter(?release_date>=
"2010-12-31"^^xsd:date ) } ---> initialBinding
No "?films" on the pattern : ?films => ?film
who's solutions I want to pass to query
select ?actor where { ?film rdf:type movie:film . ?film movie:hasActor ?actor . }
-->query
and the dataset.
Yes - loop in the results of the first query, passing in a QuerySolution
each time to the second.
Will my query results gets effected on intial bindings of film ?
Yes.
If not how can I fulfill such requirement of mine.. any guidence will be really
helpful
Regards,
aj
Andy