import type { Quad } from '@rdfjs/types'; import type { AsyncIterator } from 'asynciterator'; import type { RdfAccessScope } from '../rdf/RdfAccessScope'; export interface SparqlLoadDocumentOptions { sourceUri: string; body: string; mediaType?: string; } export interface SparqlQueryOptions { sourceUri?: string; defaultDataset?: 'physical' | 'exactSource' | 'scopedUnion'; timeoutMs?: number; signal?: AbortSignal; } export interface SparqlVoidOptions extends SparqlQueryOptions { loadDocument?: SparqlLoadDocumentOptions; } /** * SPARQL Engine interface - common abstraction for SPARQL query engines */ export interface SparqlEngine { queryBindings(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlQueryOptions): Promise; queryQuads(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlQueryOptions): Promise; queryBoolean(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlQueryOptions): Promise; queryVoid(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlVoidOptions): Promise; constructGraph(graph: string, basePath: string, accessScope?: RdfAccessScope): Promise>; listGraphs(basePath: string, accessScope?: RdfAccessScope): Promise>; close(): Promise; } /** * SubgraphQueryEngine - SPARQL engine with subgraph (tenant) isolation * * Wraps a SparqlEngine implementation for use in the system. */ export declare class SubgraphQueryEngine { private readonly logger; private readonly impl; /** * Create a SubgraphQueryEngine * @param engine - A SparqlEngine implementation */ constructor(engine: SparqlEngine); queryBindings(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlQueryOptions): Promise; queryQuads(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlQueryOptions): Promise; queryBoolean(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlQueryOptions): Promise; queryVoid(query: string, basePath: string, accessScope?: RdfAccessScope, options?: SparqlVoidOptions): Promise; constructGraph(graph: string, basePath: string, accessScope?: RdfAccessScope): Promise>; listGraphs(basePath: string, accessScope?: RdfAccessScope): Promise>; close(): Promise; }