rdfjs / stream-spec

RDF/JS: Stream interfaces – A specification of a low level interface definition representing RDF data independent of a serialized format in a JavaScript environment.
https://rdf.js.org/stream-spec/
5 stars 2 forks source link

Quads remove events #1

Open iddan opened 5 years ago

iddan commented 5 years ago

Reading through the spec I wonder: is there a way to listen to quads removal in the store? As far as I understand the Source interface is only usable for additions. Am I missing something?

iddan commented 5 years ago

Implementation proposal https://github.com/rdfjs/N3.js/pull/162

bergos commented 5 years ago

If we add it, it should be optional to implement. Some backends may not list the quads which will be deleted on removeMatches (e.g. SPARQL). Also the data event of a stream is a little bit different to a remove event, as data is just the event based way of using .read().

@jacoscaz Maybe also relevant for QuadStore.

iddan commented 5 years ago

True. But generally data is when new quads are added and remove are when they are removed

elf-pavlik commented 5 years ago

@iddan would you like to create PR which adds it to this section: http://rdf.js.org/stream-spec/#optional-events I think this will allow everyone to provide better feedback.

As far as I understand the Source interface is only usable for additions.

Store interface defines method for removals. Source only match() for reads and Sink only import() for additions.

iddan commented 5 years ago

Yes!