@dbcube/core
v5.2.10
Published
DBCube core runtime: manages the Rust query/schema engines (daemon mode, binary download, config loading) shared by the query builder, schema builder and ORM.
Maintainers
Keywords
Readme
@dbcube/core
Core runtime for the DBCube ecosystem. You normally don't install this package directly — it ships as a dependency of dbcube (the ORM), @dbcube/query-builder and @dbcube/schema-builder.
What it does
- Engine management: downloads, versions and runs the Rust
query-engineandschema-enginebinaries for your platform. - Daemon mode: keeps the query engine alive as a local TCP server with warm connection pools (sub-millisecond dispatch), with automatic fallback to one-shot mode. Disable with
DBCUBE_DAEMON=0. - Config loading: parses
dbcube.config.js(config.set({ databases: { ... } })) and exposes per-database settings. - Processors: computed fields (
@compute/@columnin.cubefiles), trigger metadata and schema diffing used bytable:refresh.
Usage
const { QueryEngine } = require('@dbcube/core');
const engine = new QueryEngine('myapp'); // name from dbcube.config.js
const res = await engine.rawQuery('SELECT 1');For application code use the dbcube ORM instead.
Documentation
https://dbcube.org
License
MIT
