cbl_dart
3.5.2, released 2 weeks ago by cbl-dart.dev
Embedded NoSQL JSON document database for pure Dart and Flutter apps.
What it does
Provides an embedded, NoSQL document-style database supporting JSON documents, blobs, encryption, SQL++ queries, full-text search, and data synchronization. It runs across Android, iOS, Windows, macOS, and Linux.
AI-written summary of version 3.5.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a robust, local NoSQL document database in a pure Dart or Flutter app.
- You require advanced features like SQL++ queries, full-text search, and data synchronization.
- You need to store and observe complex, deeply nested JSON structures locally.
Skip it when
- You only need simple key-value persistence and prefer a lighter dependency.
- You strictly require a relational SQL database without document store complexity.
Strengths
- Cross-platform support spanning mobile and desktop operating systems.
- Rich querying capabilities using SQL++ and full-text search.
- Supports live queries and database change notifications.
Weaknesses
- Heavier footprint compared to basic key-value stores.
- Not an official Couchbase product.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
Standalone Dart and Flutter with no manual setup required, just add the package.
import 'package:cbl/cbl.dart';
Future<void> run() async {
final database = await Database.openAsync('database');
final collection = await database.createCollection('components');
final mutableDocument = MutableDocument({'type': 'SDK', 'majorVersion': 2});
await collection.saveDocument(mutableDocument);
await database.close();
}Alternatives
Packages that do the same job and could replace cbl_dart.
Works with
Packages commonly used together with cbl_dart: ones it builds on, ones built on it, and its own family.
- cryptocbl_dart depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- loggingcbl_dart depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- cblcbl_dart depends on itAn offline-first NoSQL document database with SQL++ queries, full-text search, and bi-directional sync.
- cbl_flutterSame familyFlutter plugin for Couchbase Lite, an embedded NoSQL document database with sync support.