Skip to main content

Module schema

Module schema 

Source
Expand description

Database schema.

Structs§

StoreOptions
Options chosen when a store is created.

Constants§

SCHEMA_VERSION
Current schema version stored in oxilite_meta. Version 2 keeps the schema registry as RDF in <oxilite:schema> (no schema_graphs table) and scopes tbox_closure; opening a version 1 store migrates it (ops::open_job).
TBOX_INDEX
TBOX_TABLE
The TBox closure cache, one closure per scope (see reason::closure_statements).

Functions§

base_schema
DDL statements creating (idempotently) the oxilite schema without versioning.
create_schema
DDL creating the oxilite schema, versioning included: a script for a new database (a D1 migration). Not idempotent when versioning is on (ALTER TABLE); stores opened in place use base_schema and apply their level through version::change_statements.
schema_sql
The schema as one SQL script (for wrangler d1 migrations).
schema_sql_with
The schema plus extra DDL of optional modules (e.g. oxilite-jsonld’s tables).
system_graph_statements
Statements writing the system graphs (see StoreOptions::system_graphs) and rebuilding the schema caches they scope.