Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TripleStore

Implements

Index

Constructors

constructor

Properties

NEXT_ID

NEXT_ID: number

allIDs

allIDs: TripleIds

freeIDs

freeIDs: number[]

indexO

indexO: Map<any, TripleIds>

indexP

indexP: Map<any, TripleIds>

indexS

indexS: Map<any, TripleIds>

indexSelections

indexSelections: IObjectOf<Map<any, ISubscription<Edit, TripleIds>>>

queries

queries: Map<string, ISubscription<any, TripleIds>>

streamAll

streamAll: Stream<TripleIds>

streamO

streamO: Stream<Edit>

streamP

streamP: Stream<Edit>

streamS

streamS: Stream<Edit>

triples

triples: Pattern[]

Methods

[iterator]

  • [iterator](): IterableIterator<Pattern>
  • Returns IterableIterator<Pattern>

add

addJoin

addMultiJoin

Protected addParamQueries

addParamQuery

  • Creates a new parametric query using given pattern with at least 1 query variable. Query vars are strings with ? prefix. The rest of the string is considered the variable name.

    g.addParamQuery(["?a", "friend", "?b"]);
    

    Internally, the query pattern is translated into a basic param query with an additional result transformation to resolve the stated query variable solutions. Returns a rstream subscription emitting arrays of solution objects like:

    [{a: "asterix", b: "obelix"}, {a: "romeo", b: "julia"}]
    

    Parameters

    Returns QuerySolution

addPathQuery

  • Converts the given path pattern into a number of sub-queries and return a rstream subscription of re-joined result solutions. If maxLen is given and greater than the number of actual path predicates, the predicates are repeated.

    Parameters

    Returns QuerySolution

addPatternQuery

  • addPatternQuery(pattern: Pattern, id?: string): ISubscription<any, Triples>
  • addPatternQuery(pattern: Pattern, id?: string, emitTriples?: false): ISubscription<any, TripleIds>
  • addPatternQuery(pattern: Pattern, id?: string, emitTriples?: true): ISubscription<any, Triples>
  • Creates a new query subscription from given SPO pattern. Any null values in the pattern act as wildcard selectors and any other value as filter for the given triple component. E.g. the pattern [null, "type", "person"] matches all triples which have "type" as predicate and "person" as object. Likewise the pattern [null, null, null] matches ALL triples in the graph.

    By default, the returned rstream subscription emits sets of matched triples. If only the raw triple IDs are wanted, set emitTriples arg to false.

    Parameters

    • pattern: Pattern
    • Optional id: string

    Returns ISubscription<any, Triples>

  • Parameters

    • pattern: Pattern
    • Optional id: string
    • Optional emitTriples: false

    Returns ISubscription<any, TripleIds>

  • Parameters

    • pattern: Pattern
    • Optional id: string
    • Optional emitTriples: true

    Returns ISubscription<any, Triples>

addQueryFromSpec

  • Compiles given query spec into a number of sub-queries and result transformations. Returns rstream subscription of final result sets. See QuerySpec docs for further details.

    Parameters

    Returns QuerySolution

delete

Protected findTriple

get

  • get(t: Pattern, notFound?: any): any

Protected getIndexSelection

  • getIndexSelection(stream: Stream<Edit>, key: any, id: string): ISubscription<any, TripleIds>

has

into

  • into(triples: Iterable<Pattern>): boolean

Protected nextID

  • nextID(): number

replace

  • Replaces triple a with b, iff a is actually in the store. Else does nothing.

    Parameters

    Returns boolean

toDot

  • toDot(opts?: Partial<DotOpts>): string
  • Parameters

    • Optional opts: Partial<DotOpts>

    Returns string

Generated using TypeDoc