You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify adding, editing and deleting triples in data sources
Pitch
Many applications use the same form of query for querying, adding, removing and editing queries.
As of right now every single one of these actions can require a long chain of synchronous function.
With comunica:
create a query engine
create a string query
use the engine to query
(optionally) get quad/bindingStream from result
register listeners/convert results to array.
This has to be done for every action to the datasource.
The only thing we didn't know for this query where the name, webID and DOB . The structure and ontology used can all be extracted from the first query.
Where the only additional thing we need is the triple from the first query we wish to remove.
This scenario, which is a reoccurring scenario, can be simplified for developers.
Often this is a collection of data in one source (additional info might be needed from other sources e.g. fetch the name from webID.)
Desired solution
Create a class/object that's constructed by a query. This class/object then queries for the results (e.g. with comunica), streams the results in a certain form e.g. {id, result}.
This object can than parse the query it got constructed with and use the id to implement the following functions:
QueryHelperobj=newQueryHelper("select ?name ?dob where....");obj.get(offset,limit);obj.deleteTriple(id);obj.addTriple(jsonObject);// where the json object has the same form as result obj.editTriple(id,jsonObject);
Acceptance criteria
The class/object working for the example in the pitch.
The class/object can be constructed with a query
We can do pagination with the .get function.
We can remove a triple with the id without having to create another string query.
We can add a triple without having to create another string query.
Simplify adding, editing and deleting triples in data sources
Pitch
Many applications use the same form of query for querying, adding, removing and editing queries.
As of right now every single one of these actions can require a long chain of synchronous function.
With comunica:
This has to be done for every action to the datasource.
For example a list of friends:
We can add another friend by
The only thing we didn't know for this query where the
name
,webID
andDOB
. The structure and ontology used can all be extracted from the first query.Same for deleting a friend:
Where the only additional thing we need is the triple from the first query we wish to remove.
This scenario, which is a reoccurring scenario, can be simplified for developers.
Often this is a collection of data in one source (additional info might be needed from other sources e.g. fetch the name from webID.)
Desired solution
Create a class/object that's constructed by a query. This class/object then queries for the results (e.g. with comunica), streams the results in a certain form e.g.
{id, result}
.This object can than parse the query it got constructed with and use the
id
to implement the following functions:Acceptance criteria
The class/object working for the example in the pitch.
.get
function.Pointers
Scenarios
The text was updated successfully, but these errors were encountered: