processor
Code for tying SPARQL Engine into RDFLib
These should be automatically registered with RDFLib
Classes:
Functions:
-
prepareQuery–Parse and translate a SPARQL Query
-
prepareUpdate–Parse and translate a SPARQL Update
-
processUpdate–Process a SPARQL Update Request
SPARQLProcessor
Bases: Processor
Methods:
-
query–Evaluate a query with the given initial bindings, and initial
Attributes:
-
graph–
Source code in rdflib/plugins/sparql/processor.py
query
query(strOrQuery: Union[str, Query], initBindings: Optional[Mapping[str, Identifier]] = None, initNs: Optional[Mapping[str, Any]] = None, base: Optional[str] = None, DEBUG: bool = False) -> Mapping[str, Any]
Evaluate a query with the given initial bindings, and initial namespaces. The given base is used to resolve relative URIs in the query and will be overridden by any BASE given in the query.
Caution
This method can access indirectly requested network endpoints, for
example, query processing will attempt to access network endpoints
specified in SERVICE directives.
When processing untrusted or potentially malicious queries, measures should be taken to restrict network and file access.
For information on available security measures, see the RDFLib Security Considerations documentation.
Source code in rdflib/plugins/sparql/processor.py
SPARQLResult
Bases: Result
Attributes:
Source code in rdflib/plugins/sparql/processor.py
SPARQLUpdateProcessor
Bases: UpdateProcessor
Methods:
-
update–Caution
Attributes:
-
graph–
Source code in rdflib/plugins/sparql/processor.py
update
update(strOrQuery: Union[str, Update], initBindings: Optional[Mapping[str, Identifier]] = None, initNs: Optional[Mapping[str, Any]] = None) -> None
Caution
This method can access indirectly requested network endpoints, for
example, query processing will attempt to access network endpoints
specified in SERVICE directives.
When processing untrusted or potentially malicious queries, measures should be taken to restrict network and file access.
For information on available security measures, see the RDFLib Security Considerations documentation.
Source code in rdflib/plugins/sparql/processor.py
prepareQuery
prepareQuery(queryString: str, initNs: Optional[Mapping[str, Any]] = None, base: Optional[str] = None) -> Query
Parse and translate a SPARQL Query
Source code in rdflib/plugins/sparql/processor.py
prepareUpdate
prepareUpdate(updateString: str, initNs: Optional[Mapping[str, Any]] = None, base: Optional[str] = None) -> Update
Parse and translate a SPARQL Update
Source code in rdflib/plugins/sparql/processor.py
processUpdate
processUpdate(graph: Graph, updateString: str, initBindings: Optional[Mapping[str, Identifier]] = None, initNs: Optional[Mapping[str, Any]] = None, base: Optional[str] = None) -> None
Process a SPARQL Update Request returns Nothing on success or raises Exceptions on error