cbl 2.1.6
cbl: ^2.1.6 copied to clipboard
Couchbase Lite is an embedded, NoSQL JSON Document Style database, supporting Blobs, Encryption, N1QL Queries, Live Queries, Full-Text Search and Data Sync.
// 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.
LibrariesConfiguration getLibraries() {
throw UnimplementedError('TODO');
}
Future<void> main() async {
// Couchbase Lite needs to be initialized before it can be used.
await 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();
}