A quad destination.

interface IQuadDestination {
    createGraphs: ((graphs, requireNonExistence) => Promise<void>);
    delete: ((quads) => Promise<void>);
    deleteGraphs: ((graphs, requireExistence, dropGraphs) => Promise<void>);
    insert: ((quads) => Promise<void>);
}

Implemented by

    Properties

    createGraphs: ((graphs, requireNonExistence) => 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>

    delete: ((quads) => Promise<void>)

    Delete the given quad stream from the destination.

    Type declaration

      • (quads): Promise<void>
      • Parameters

        • quads: AsyncIterator<Quad>

          The quads to delete.

        Returns Promise<void>

    Returns

    The deleted quad stream.

    deleteGraphs: ((graphs, requireExistence, dropGraphs) => Promise<void>)

    Graphs that should be deleted.

    Type declaration

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

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

          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>

    insert: ((quads) => Promise<void>)

    Insert the given quad stream into the destination.

    Type declaration

      • (quads): Promise<void>
      • Parameters

        • quads: AsyncIterator<Quad>

          The quads to insert.

        Returns Promise<void>

    Returns

    The inserted quad stream.