nebula_db 2.0.2 copy "nebula_db: ^2.0.2" to clipboard
nebula_db: ^2.0.2 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.flutter-io.cn 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
0
points
13
downloads

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.

Repository (GitHub)
View/report issues

Topics

#database #sql #storage #embedded #engine

License

unknown (license)

More

Packages that depend on nebula_db