-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowing backends to indicate whether they prefer the sparql interface #255
Conversation
…they prefer the sparql query() or triples() interface
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #255 +/- ##
==========================================
+ Coverage 79.11% 79.21% +0.09%
==========================================
Files 18 18
Lines 1719 1727 +8
==========================================
+ Hits 1360 1368 +8
Misses 359 359 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any documentation anywhere on what is needed to create a new backend? If so we should add there that the prefer_sparql attribute should be set. If not, we should have an issue on making such a template/documentation.
Furthermore, have you tested this with PyBackTrip? I guess this is not backwards compatible?
Co-authored-by: Francesca L. Bleken <48128015+francescalb@users.noreply.github.com>
The best documentation is the interface.py file. I have already added the |
Great, then I think it would be very good to add a sentence about looking into this file if one wants to make a new backend. (In the documentation for developers part). It is enough with one sentence for now |
done |
Description
Allow backends to add a class attribute
prefer_sparql
attribute, indicating whether they prefer calls to the SPARQLquery()
method instead of thetriples()
method.Added the
Triplestore.prefer_sparql
property for easy access to this attribute.Also renamed TriplestoreError to TripperError and some additional cleanup of warnings.
Type of change
Checklist for the reviewer
This checklist should be used as a help for the reviewer.