cbl 4.0.0-dev.0
cbl: ^4.0.0-dev.0 copied to clipboard
Couchbase Lite is an embedded, NoSQL JSON Document Style database, supporting Blobs, Encryption, SQL++ Queries, Live Queries, Full-Text Search and Data Sync.
example/lib/main.dart
// ignore_for_file: avoid_print
import 'package:cbl/cbl.dart';
Future<void> main() async {
// Couchbase Lite needs to be initialized before it can be used.
await CouchbaseLite.init();
final db = await Database.openAsync('chat-app');
final messages = await db.createCollection('messages');
final doc = MutableDocument({
'type': 'message',
'body': 'Heyo',
'from': 'Alice',
});
await messages.saveDocument(doc);
await db.close();
}