Terms
All of the tokens into each Triple must be enclosed within a wrapper Term class (eventually determined automatically based on his position on the Triple itself, see below). Here a summary of each Term type, with some example.
Variable |
Any SPARQL variable (the tokens having a ? before the name). If no parameters are passed, the name is randomly generated.This is usually used if you explicitely want a given value to be used in different parts of the query: init one or more Variable PHP variables and pass it as parameter to the different functions.
Show generated query
|
Literal |
A typed value. May be a string, a number, a date... This wraps the Literal class from EasyRDF.
Show generated query
|
OwnSubject |
The subject of the query. Can be used as a Variable (actually: it is a Variable) and placed in different parts of the query. Multiple OwnSubject distributed within the same query will have the same value (note: subqueries are not part of the parent queries, so a different OwnSubject will be assigned).
Show generated query
|
Iri |
Wraps all predicate names and entity subjects. The parameters passed to doSelect() , and the first parameter of where() functions (if only two are passed), are automatically wrapped within a Iri.
Show generated query
|
Plain |
Includes a generic string that will be enclosed between quotes in the final query. Useful to explicitely enforce a string where another type of Term is expected.
Show generated query
|
Raw |
Includes a generic string that will be appended as-is (with no quotes or escapes) in the final query. Useful to enforce specific parts of the query and special syntax non handled by SPARQLer. |
Optional |
Used to wrap a Iri (default, if a plain string is passed) or a Variable to be optionally added into the result set. Mostly used in the parameters list of doSelect() and doConstruct() .
Show generated query
|
Aggregate |
A SPARQL function applied to some value. Parameters are: the name of the function, the parameter(s) to that function (note: plain strings will be handled as Iri), and optionally an alternative name to hold the final result of the function.
Show generated query
|