nebula_db 2.0.3 copy "nebula_db: ^2.0.3" to clipboard
nebula_db: ^2.0.3 copied to clipboard

A production-grade relational database engine written in pure Dart. Features include WAL, MVCC, B-Tree indexing, SQL execution, and crash recovery.

๐Ÿง  NebulaDB #

Sans titre

โšก Lightweight embedded SQL database engine written in pure Dart

pub.dev License Dart


๐Ÿš€ Overview #

NebulaDB is a lightweight, embedded relational database engine built entirely in Dart.

It provides a full SQL execution pipeline with persistent storage and Write-Ahead Logging (WAL).


โœจ Features #

  • SQL parser & executor
  • WHERE / JOIN / GROUP BY
  • B-Tree indexing
  • Page-based storage (4KB)
  • WAL + crash recovery
  • Basic transactions

๐Ÿ“ฆ Installation #

dart pub add nebula_db

โšก Quick Example #

import 'nebula_db.dart';

void main() async {
  final db = await NebulaDB.open('./my_db');

  await db.execute('''
    CREATE TABLE users (
      id INT,
      name TEXT,
      age INT
    )
  ''');

  await db.execute("INSERT INTO users VALUES (1, 'Ahmed', 25)");

  final result = await db.execute('SELECT * FROM users');
  result.prettyPrint();

  await db.close();
}

๐ŸŽฏ Use Cases #

  • Flutter apps (offline-first)
  • Embedded/local databases
  • Learning database internals

โš ๏ธ Limitations #

  • Single-process only
  • No advanced concurrency yet
  • Not designed for large-scale production

๐Ÿงช Testing #

dart test

๐Ÿ“„ License #

MIT License


3
likes
130
points
21
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A production-grade relational database engine written in pure Dart. Features include WAL, MVCC, B-Tree indexing, SQL execution, and crash recovery.

Topics

#database #sql #storage #embedded #engine

License

MIT (license)

More

Packages that depend on nebula_db