The database of the LexerLang ecosystem
One shell, many seeds.
Schemas, indexes and a distribution map in one .ndbc container, crash-safe with a write-ahead log. A chained language instead of SQL: create_schema, from, insert_one.
NarDB Shell
cd nardb_shell && go build -o nardb . && ./nardb
Not SQL — a chain
Schemas and queries are written in the same chained language. Without .commit() a schema is only validated; errors come with a line, a column and usually a fix.
create_schema('uyeler')
.fields({
'id': {type: string, max_length: 32, guid: true, primary_key: true},
'name': {type: string, max_length: 50},
'email': {type: string, max_length: 100, index: {unique: true}},
'birth': {type: date, format: 'dd.mm.yyyy'}
})
.commit();from('uyeler').insert_one({name: 'Osman 🍉', email: 'osman@example.com', birth: '23.09.1981'});
from('uyeler', 'u')
.where({'u.email': 'osman@example.com'})
.fields({CAST('u.name', 'ad'), FORMAT('u.birth', 'dd-mm-yyyy')})
.get();Getting started
Schema
- create_schema Fields, types, lengths, character encodings and indexes.
- Validation check rules, nullable, default and password fields.
- alter_schema Add, update, rename and drop fields and indexes.
- Partition and distribution Split data into ranges and record where each range lives inside the .ndbc file.
Queries
Administration
- Users The privileges system schema, Argon2id password hashes and the shell's login password.
- Pool settings Connection count, concurrent query limit and query timeout.
- Encryption Encryption at rest, where the key lives, changing the passphrase and rotating the key.
- Backup Taking encrypted, compressed .ndbz backups and restoring them on another machine.
- Server (nardbd) Serving databases over gRPC with mutual TLS — certificates, configuration, grants and the audit log.