Installation
DortDB is distributed as a set of npm packages. You always install the core, and then add one or more language packages.
Core
- npm
- Yarn
- pnpm
- Bun
npm install @dortdb/core
yarn add @dortdb/core
pnpm add @dortdb/core
bun add @dortdb/core
@dortdb/core is the engine. It ships no query
language on its own; you add those separately.
Language packages
Install whichever of the provided languages you want to use:
- npm
- Yarn
- pnpm
- Bun
npm install @dortdb/lang-sql
npm install @dortdb/lang-cypher graphology
npm install @dortdb/lang-xquery
yarn add @dortdb/lang-sql
yarn add @dortdb/lang-cypher graphology
yarn add @dortdb/lang-xquery
pnpm add @dortdb/lang-sql
pnpm add @dortdb/lang-cypher graphology
pnpm add @dortdb/lang-xquery
bun add @dortdb/lang-sql
bun add @dortdb/lang-cypher graphology
bun add @dortdb/lang-xquery
@dortdb/lang-sql: SQL over object-shaped rows.@dortdb/lang-cypher: Cypher over property graphs. Its default data adapter is backed by Graphology, which is a peer dependency, so installgraphologyalongside it.@dortdb/lang-xquery: XQuery over XML / DOM / tree-shaped data.
Each language package declares @dortdb/core as
a peer dependency, so a single core instance is shared across all of them.
Because the core and each language are separate packages, a browser bundle only includes the languages and extensions you actually import. Loading SQL does not pull in the Cypher or XQuery parsers. See Design Principles.
Optional extensions
Extensions bundle extra functions, operators, or aggregates. The provided
datetime extension adds date/time helpers:
- npm
- Yarn
- pnpm
- Bun
npm install @dortdb/datetime
yarn add @dortdb/datetime
pnpm add @dortdb/datetime
bun add @dortdb/datetime
See Functions & Aggregates for how extensions work and how to write your own.
Next step
Continue to Your First Query to construct an engine and run a query.