nebula_db 2.0.3
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 #
โก Lightweight embedded SQL database engine written in pure 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