๐Ÿง  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