cbl_dart 1.0.0+0 cbl_dart: ^1.0.0+0 copied to clipboard
Couchbase Lite for pure Dart apps: An embedded, NoSQL JSON Document Style database, supporting Blobs, Encryption, N1QL Queries, Live Queries, Full-Text Search and Data Sync.
Couchbase Lite is an embedded, NoSQL JSON Document Style database, supporting Blobs, Encryption, N1QL Queries, Live Queries, Full-Text Search and Data Sync.
It can be used as a standalone embedded database for mobile or desktop apps. Or it can be combined with [Sync Gateway] to synchronize with a central data store.
What are all these packages for?
Couchbase Lite can be used with standalone Dart or with Flutter apps and comes in two editions: Community and Enterprise.
Regardless of the app platform and edition of Couchbase Lite you use, you always
need the cbl
package. All of the APIs of Couchbase Lite live in this package.
What other packages you need depends on the app platform and the edition of Couchbase Lite you use.
Package | Required when you want to: | Pub | Likes | Points | Popularity |
---|---|---|---|---|---|
cbl | use Couchbase Lite. | ||||
cbl_dart | use the Community or Enterprise Edition in a standalone Dart app or in Flutter unit tests. | ||||
cbl_flutter | use Couchbase Lite in a Flutter app. | ||||
cbl_flutter_ce | use the Community Edition in a Flutter app. | ||||
cbl_flutter_ee | use the Enterprise Edition in a Flutter app. | ||||
cbl_sentry | integrate Couchbase Lite with Sentry in a Dart or Flutter app. |
🎯 Platform Support #
Platform | Version |
---|---|
macOS | >= 10.14 |
Linux | == Ubuntu 20.04-x86_64 |
Windows | >= 10 |
🔌 Getting Started #
-
Add
cbl
andcbl_dart
as dependencies:dependencies: cbl: ... cbl_dart: ...
-
Initialize Couchbase Lite before using it. This is also where you select the edition of Couchbase Lite you want to use:
import 'package:cbl_dart/cbl_dart.dart'; Future<void> initCouchbaseLite() async { await CouchbaseLiteDart.init(edition: Edition.community); }
Note that
init
downloads the needed native libraries if they have not already been cached. See the documentation forCouchbaseLiteDart.init
for more information.⚖️ You need to comply with the Couchbase licensing terms of the edition of Couchbase Lite you select.
Default database directory #
When opening a database without specifying a directory, the current working
directory will be used. CouchbaseLiteDart.init
allows you to specify a
different default directory.
💡 Where to go next #
- Check out the example app in the Example tab.
- Look at the usage examples for
cbl
.
⚖️ Disclaimer #
⚠️ This is not an official Couchbase product.