@oxilite/common
v0.2.2
Published
RDF/JS terms and result conversion shared by the oxilite JavaScript packages
Maintainers
Readme
@oxilite/common
RDF/JS terms and the shared TypeScript types of oxilite, used by @oxilite/node and @oxilite/d1.
Website · npm · Guide and architecture · Changelog and issues
You rarely install it directly: both packages re-export everything here.
import { namedNode, literal, quad, DataFactory, type Term } from "@oxilite/node"; // or "@oxilite/d1"
const q = quad(namedNode("http://example.com/ada"), namedNode("http://example.com/name"), literal("Ada", "en"));What is inside
- RDF/JS terms:
NamedNode,BlankNode,Literal(with language and direction),DefaultGraph,VariableandQuad(also usable as an RDF 1.2 triple term), plusDataFactoryand its shortcutsnamedNode,blankNode,literal,defaultGraph,variable,quad,triple. They follow the RDF/JS data model, so they mix with other RDF/JS libraries. - SPARQL types:
QueryOptions(with oxilite'sreasoningandinclude_inferred),LoadOptions,DumpOptions,QueryResult. - Cypher types:
CypherValue,CypherNode,CypherRelationship,CypherPath,CypherTemporal,CypherResult,CypherStatsandCypherOptions(base,prefixes,names,multiValue,reasoning,shapes…). - JSON-LD and credential types:
JsonLdOptions,CredentialOptions,KeyStrategy,GraphStrategy,StoredDocument,DocumentFilter,Drift,PresentationKeysand theJsonLdErrorclass (with its JSON-LD errorcode). - JSON helpers:
toJson/fromJsonconvert terms to and from the JSON form the oxilite core exchanges.
The oxilite family
oxilite is an Oxigraph-compatible RDF database and SPARQL 1.1 engine that stores its data in SQLite, so it runs anywhere SQLite runs: in-process, on a system or vendor libsqlite3, on Cloudflare D1 and in Durable Objects. The same data can be queried with SPARQL and openCypher, reasoned over with RDFS / OWL, and validated with SHACL and ShEx. Read the overview on oxilitedb.com and the full guide in the main README.
| Package | What it is for |
|---|---|
| oxilite | The store: a drop-in for oxigraph::store::Store, plus AsyncStore for D1 |
| oxilite-core | The sans-IO core: term encoding, schema, SPARQL → SQL compiler and planner |
| oxilite-rusqlite | In-process backend with a bundled SQLite (the default) |
| oxilite-dylib | Backend that loads your own libsqlite3 at runtime |
| oxilite-d1 | Cloudflare D1 backend for Rust Workers |
| oxilite-cypher | openCypher over the same data, OWL- and SHACL-aware |
| oxilite-jsonld | JSON-LD documents stored verbatim, one named graph each |
| oxilite-vc | Verifiable Credentials: stored under their id, indexed, queryable |
| oxilite-reason | OWL 2 RL materialization with reasonable |
| oxilite-validate | SHACL and ShEx validation with rudof |
| oxilite-cli | The oxilite command and a SPARQL endpoint like oxigraph serve |
| @oxilite/node | Node.js bindings, API of Oxigraph's JS package |
| @oxilite/d1 | Cloudflare D1 and Durable Objects from TypeScript (WebAssembly core) |
| @oxilite/common | RDF/JS terms and shared TypeScript types |
License
Dual-licensed under MIT or Apache-2.0, at your option, like Oxigraph.
