-
Notifications
You must be signed in to change notification settings - Fork 13
Modularizes Queryable and SparqlQueryable interfaces #32
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
Modularizes Queryable and SparqlQueryable interfaces #32
Conversation
|
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.
I'm happy with this change!
@jacoscaz I didn't test this decoupling of string- and algebra-queryable in actual code on my end though. Did you?
* | ||
* @see Query | ||
*/ | ||
query(query: Algebra, context?: QueryAlgebraContextType): Promise<Query<SupportedMetadataType>>; | ||
} | ||
|
||
/** | ||
* SPARQL-constrainted query interface. | ||
* | ||
* This interface guarantees that result objects are of the expected type as defined by the SPARQL spec. |
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.
Tsdoc doesn't mention the fact that it's string-queryable.
/** | ||
* SPARQL-constrainted query interface. | ||
* | ||
* This interface guarantees that result objects are of the expected type as defined by the SPARQL spec. |
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.
Tsdoc doesn't mention the fact that it's algebra-queryable.
@rubensworks I did a small amount of manual testing to verify whether methods get correctly overloaded across interfaces but this could definitely do with more testing. Might be a good starting point for actual type tests, as per @tpluscode's comment in the other PR. I was waiting for preliminary feedback before committing further effort. |
Yep, I'm already working on those as we speak in #30 |
…es provided as algebra objects in comments
…on a specific algebra implementation
EDIT: I should premise that this PR builds on the
feature/query
branch, for which there is already an open PR at #30 .This PR was inspired by @tpluscode's feedback as discussed on Gitter.im. The goal is to break down
Queryable
andSparqlQueryable
into simpler, more modular interfaces that can be combined without loss in expressivity. I've opted to break them down based on query type (string vs. Algebra).Example of what becomes possible with this PR: