Skip to content
NarDBv0.2.0-dev

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.

NarQL
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();
NarQL
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();