@traqula/engine-sparql-1-1-adjust
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.137 • Public • Published

TRAQULA parser engine for SPARQL 1.1 + Adjust

TRAQULA Sparql 1.1 Adjust is a SPARQL 1.1 query parser that also parses the builtin function ADJUST for TypeScript. Simple grammar extension of TRAQULA engine-sparql-1-1

Installation

npm install @traqula/engine-sparql-1-1

or

yarn add @traqula/engine-sparql-1-1

Import

Either through ESM import:

import { Sparql11AdjustParser } from '@traqula/engine-sparql-1-1-adjust';

or CJS require:

const Sparql11AdjustParser = require('@traqula/engine-sparql-1-1-adjust').Sparql11AdjustParser;

Usage

This package contains a Sparql11AdjustParser that is able to parse SPARQL 1.1 queries including the builtin function ADJUST:

const parser = new Sparql11Parser();
const abstractSyntaxTree = parser.parse(`
SELECT ?s ?p (ADJUST(?o, "-PT10H"^^<http://www.w3.org/2001/XMLSchema#dayTimeDuration>) as ?adjusted) WHERE {
  ?s ?p ?o
}
`);

This parser is a simple grammar extension to the engine-sparql-1-1. As such, most, if not all, documentation of that parser holds for this one too.

Readme

Keywords

none

Package Sidebar

Install

npm i @traqula/engine-sparql-1-1-adjust

Weekly Downloads

1

Version

0.0.1-alpha.137

License

MIT

Unpacked Size

524 kB

Total Files

10

Last publish

Collaborators

  • rubensworks
  • jitsedesmet