cbl 1.0.0-beta.3 cbl: ^1.0.0-beta.3 copied to clipboard
Couchbase Lite for Dart. A NoSQL database with change notification, full text search and replication.
// ignore_for_file: avoid_print
import 'package:cbl/cbl.dart';
/// You need to specify how to access the native libraries, on top of which
/// `cbl` is implemented.
Libraries getLibraries() {
throw UnimplementedError('TODO');
}
Future<void> main() async {
// Couchbase Lite needs to be initialized before it can be used.
CouchbaseLite.init(libraries: getLibraries());
final db = await Database.openAsync('chat-messages');
final doc = MutableDocument({
'type': 'message',
'body': 'Heyo',
'from': 'Alice',
});
await db.saveDocument(doc);
await db.close();
}