A quad destination.

interface IQuadDestination {
    createGraphs: ((graphs: NamedNode<string>[], requireNonExistence: boolean) => Promise<void>);
    deleteGraphs: ((graphs:
        | DefaultGraph
        | "NAMED"
        | "ALL"
        | NamedNode<string>[], requireExistence: boolean, dropGraphs: boolean) => Promise<void>);
    update: ((quadStreams: {
        delete?: AsyncIterator<Quad>;
        insert?: AsyncIterator<Quad>;
    }) => Promise<void>);
}

Implemented by

    Properties

    createGraphs: ((graphs: NamedNode<string>[], requireNonExistence: boolean) => Promise<void>)

    Create the given (empty) graphs.

    Type declaration

      • (graphs, requireNonExistence): Promise<void>
      • Parameters

        • graphs: NamedNode<string>[]

          The graph names to create.

        • requireNonExistence: boolean

          If true, an error MUST be thrown when any of the graph already exists. For destinations that do not record empty graphs, this should only throw if at least one quad with the given quad already exists.

        Returns Promise<void>

    deleteGraphs: ((graphs:
        | DefaultGraph
        | "NAMED"
        | "ALL"
        | NamedNode<string>[], requireExistence: boolean, dropGraphs: boolean) => Promise<void>)

    Graphs that should be deleted.

    Type declaration

      • (graphs, requireExistence, dropGraphs): Promise<void>
      • Parameters

        • graphs:
              | DefaultGraph
              | "NAMED"
              | "ALL"
              | NamedNode<string>[]

          The graph(s) in which all triples must be removed.

        • requireExistence: boolean

          If true, and any of the graphs does not exist, an error must be emitted. Should only be considered on destinations that record empty graphs.

        • dropGraphs: boolean

          If the graphs themselves should also be dropped. Should not happen on the 'DEFAULT' graph. Should only be considered on destinations that record empty graphs.

        Returns Promise<void>

    update: ((quadStreams: {
        delete?: AsyncIterator<Quad>;
        insert?: AsyncIterator<Quad>;
    }) => Promise<void>)

    Updates destination with quad stream to insert and quad stream to delete.

    Type declaration

      • (quadStreams): Promise<void>
      • Parameters

        • quadStreams: {
              delete?: AsyncIterator<Quad>;
              insert?: AsyncIterator<Quad>;
          }

          The quads to insert and delete.

          • Optionaldelete?: AsyncIterator<Quad>
          • Optionalinsert?: AsyncIterator<Quad>

        Returns Promise<void>