UNPKG

@jahed/sparql-engine

Version:

SPARQL query engine for servers and web browsers.

76 lines (75 loc) 3.19 kB
import type { EngineTripleValue } from "../../types.ts"; type Term = EngineTripleValue; /** * Implementation of SPARQL operations found in FILTERS * All arguments are pre-compiled from string to an intermediate representation. * All possible intermediate representation are gathered in the `src/rdf-terms.js` file, * and are used to represents RDF Terms. * Each SPARQL operation is also expected to return the same kind of intermediate representation. */ declare const _default: { coalesce: (baseValue: Term | null, defaultValue: Term | null) => Term; if: (booleanValue: Term | null, valueIfTrue: Term | null, valueIfFalse: Term | null) => Term; "+": (a: Term, b: Term) => Term; "-": (a: Term, b: Term) => Term; "*": (a: Term, b: Term) => Term; "/": (a: Term, b: Term) => Term; "=": (a: Term, b: Term) => Term; "!=": (a: Term, b: Term) => Term; "<": (a: Term, b: Term) => Term; "<=": (a: Term, b: Term) => Term; ">": (a: Term, b: Term) => Term; ">=": (a: Term, b: Term) => Term; "!": (a: Term) => Term; "&&": (a: Term, b: Term) => Term; "||": (a: Term, b: Term) => Term; bound: (a: Term) => import("@rdfjs/types").Literal; sameterm: (a: Term, b: Term) => Term; in: (a: Term, b: Term[]) => Term; notin: (a: Term, b: Term[]) => Term; isiri: (a: Term) => Term; isblank: (a: Term) => Term; isliteral: (a: Term) => Term; isnumeric: (a: Term) => Term; str: (a: Term) => Term; lang: (a: Term) => Term; datatype: (a: Term) => Term; iri: (a: Term) => Term; bnode: (a?: Term) => Term; strdt: (x: Term, datatype: Term) => Term; strlang: (x: Term, lang: Term) => Term; uuid: () => Term; struuid: () => Term; strlen: (a: Term) => Term; substr: (str: Term, index: Term, length?: Term) => Term; ucase: (a: Term) => Term; lcase: (a: Term) => Term; strstarts: (term: Term, substring: Term) => Term; strends: (term: Term, substring: Term) => Term; contains: (term: Term, substring: Term) => Term; strbefore: (term: Term, token: Term) => Term; strafter: (str: Term, token: Term) => Term; encode_for_uri: (a: Term) => Term; concat: (a: Term, b: Term) => Term; langmatches: (langTag: Term, langRange: Term) => Term; regex: (subject: Term, pattern: Term, flags?: Term) => import("@rdfjs/types").Literal; replace: (arg: Term, pattern: Term, replacement: Term, flags?: Term) => import("@rdfjs/types").Quad | import("@rdfjs/types").Variable | import("@rdfjs/types").Literal | import("rdf-data-factory").NamedNode<string> | import("rdf-data-factory").BlankNode; abs: (a: Term) => Term; round: (a: Term) => Term; ceil: (a: Term) => Term; floor: (a: Term) => Term; now: () => Term; year: (a: Term) => Term; month: (a: Term) => Term; day: (a: Term) => Term; hours: (a: Term) => Term; minutes: (a: Term) => Term; seconds: (a: Term) => Term; tz: (a: Term) => Term; md5: (a: Term) => Promise<Term>; sha1: (v: Term) => Promise<Term>; sha256: (v: Term) => Promise<Term>; sha384: (v: Term) => Promise<Term>; sha512: (v: Term) => Promise<Term>; }; export default _default;