Hello all,
Attached is the current status of the sparql engine that directly works
on any database, SparqlEngineDb.
Some implementational notes:
Model classes instantiate SparqlEngine in sparqlQuery(). Since DbModel
inherits from Model, there should be the possibility that it's decided
automatically which Sparql engine should be used.
To solve this problem, I introduced SparqlEngine::factory($model = null)
as only valid method to instantiate it (making the constructor
protected). This method decides which sparql engine to create and
returns an instance. I do know that Dataset also instantiates such an
engine, but this is solved by passing no parameter to factory().
Further, I re-indented (4 spaces) the Query and SparqlEngine class and
added extensive docblock descriptions in Query.
Current implementation status:
SparqlEngineDb currently supports simple queries only. What works:
- SELECT clauses
- OPTIONAL and normal queries
- ORDER BY
- LIMIT
- OFFSET
What does not work:
- UNION
- FILTER
- ASK, DESCRIBE, CONSTRUCT
I am working on it, but I thought it could be included into CVS (maybe
deactivated in SparqlEngine::factory()) since Chris CC'ed me as Onno
Paap wanted to add some other features to RAP, and he should have the
current sources to be able to look into it now.
--
Regards/MfG,
Christian Weiske
|