Skip to content
Dmitri Zagidulin edited this page Aug 19, 2016 · 10 revisions
Context

During a discussion of the Stream .match() method being asynchronous, the question came up about what to do with synchronous querying use cases (such as filter/matching using an in-memory store). @bergos suggested that this is what Datasets were intended for, and that we should create a Wiki page to document a potential spec and gauge community interest.

See also:

Dataset API

Properties

  • number .length Number of quads in the dataset. (Similar to Array.length)

Methods

  • Dataset add(Quad quad) adds a given quad to the dataset, returns itself.

  • Dataset addAll(Array<Quad> quads) adds all given quads to the dataset, returns itself.

  • Dataset clone() returns a copy of this dataset (and all its quads)

  • Dataset difference(Dataset other) returns a set difference of this dataset and the given one.

  • Boolean equals(Dataset other) returns true if this dataset contains the same quads as the given one.

  • Boolean every(Function callback) tests whether all elements in the dataset pass the test implemented by the provided function. (Similar to Array.every())

Clone this wiki locally