UNPKG

@jahed/sparql-engine

Version:

SPARQL query engine for servers and web browsers.

24 lines (23 loc) 1.02 kB
import type { VariableTerm } from "sparqljs"; import type { EngineTripleValue } from "../../types.ts"; type Term = EngineTripleValue; type TermRows = { [key: string]: Term[]; }; /** * SPARQL Aggregation operations. * Each operation takes an arguments a SPARQL variable and a row of bindings, i.e., a list of * solutions bindings on which the aggregation must be applied. * Each operations is expected to return a term, as with classic SPARQL operations * @see https://www.w3.org/TR/sparql11-query/#aggregateAlgebra */ declare const _default: { count: (variable: VariableTerm, rows: TermRows) => Term; sum: (variable: VariableTerm, rows: TermRows) => Term; avg: (variable: VariableTerm, rows: TermRows) => Term; min: (variable: VariableTerm, rows: TermRows) => Term; max: (variable: VariableTerm, rows: TermRows) => Term; group_concat: (variable: VariableTerm, rows: TermRows, sep?: string) => Term; sample: (variable: VariableTerm, rows: TermRows) => Term; }; export default _default;