quadstore
Version:
Quadstore is a LevelDB-backed RDF graph database / triplestore for JavaScript runtimes (browsers, Node.js, Deno, Bun, ...) that implements the RDF/JS interfaces and supports SPARQL queries and querying across named graphs.
28 lines (27 loc) • 1.21 kB
TypeScript
import type { DataFactory, Quad, BlankNode } from '@rdfjs/types';
import type { AbstractChainedBatch } from 'abstract-level';
import type { Quadstore } from '../quadstore.js';
export type ScopeLabelMapping = [string, string];
export declare class Scope {
readonly id: string;
readonly blankNodes: Map<string, BlankNode>;
readonly factory: DataFactory;
static init(store: Quadstore): Promise<Scope>;
static load(store: Quadstore, scopeId: string): Promise<Scope>;
static delete(store: Quadstore, scopeId?: string): Promise<void>;
static getLevelIteratorOpts(keys: boolean, values: boolean, scopeId?: string): {
keys: boolean;
values: boolean;
keyEncoding: string;
valueEncoding: string;
gte: string;
lte: string;
};
static addMappingToLevelBatch(scopeId: string, batch: AbstractChainedBatch<any, any, any>, originalLabel: string, randomLabel: string): void;
constructor(factory: DataFactory, id: string, blankNodes: Map<string, BlankNode>);
private parseBlankNode;
private parseSubject;
private parseObject;
private parseGraph;
parseQuad(quad: Quad, batch: AbstractChainedBatch<any, any, any>): Quad;
}