Couchbase.Lite
3.2.0-beta.2
Prefix Reserved
See the version list below for details.
dotnet add package Couchbase.Lite --version 3.2.0-beta.2
NuGet\Install-Package Couchbase.Lite -Version 3.2.0-beta.2
<PackageReference Include="Couchbase.Lite" Version="3.2.0-beta.2" />
<PackageVersion Include="Couchbase.Lite" Version="3.2.0-beta.2" />
<PackageReference Include="Couchbase.Lite" />
paket add Couchbase.Lite --version 3.2.0-beta.2
#r "nuget: Couchbase.Lite, 3.2.0-beta.2"
#:package Couchbase.Lite@3.2.0-beta.2
#addin nuget:?package=Couchbase.Lite&version=3.2.0-beta.2&prerelease
#tool nuget:?package=Couchbase.Lite&version=3.2.0-beta.2&prerelease
Couchbase Lite .NET
Couchbase Lite is a lightweight embedded NoSQL database that has built-in sync to larger backend structures, such as Couchbase Server.
This is the source repo of Couchbase Lite C#. The main supported platforms are .NET 6 Desktop (Linux will run anywhere, but is most tested on Ubuntu), .NET 8 iOS, .NET 8 Android, .NET 8 Mac Catalyst, .NET 8 WinUI, Xamarin iOS, and Xamarin Android.
Documentation Overview
- Official Documentation
- API References - See the release notes for each release on this repo
Getting Started
The following starter code demonstrates the basic concepts of the library:
using System;
using Couchbase.Lite;
using Couchbase.Lite.Query;
using Couchbase.Lite.Sync;
// Get the database (and create it if it doesn't exist)
var database = new Database("mydb");
var collection = database.GetDefaultCollection();
// Create a new document (i.e. a record) in the database
var id = default(string);
using var createdDoc = new MutableDocument();
createdDoc.SetFloat("version", 2.0f)
.SetString("type", "SDK");
// Save it to the database
collection.Save(createdDoc);
id = createdDoc.Id;
// Update a document
using var doc = collection.GetDocument(id);
using var mutableDoc = doc.ToMutable();
createdDoc.SetString("language", "C#");
collection.Save(createdDoc);
using var docAgain = collection.GetDocument(id);
Console.WriteLine($"Document ID :: {docAgain.Id}");
Console.WriteLine($"Learning {docAgain.GetString("language")}");
// Create a query to fetch documents of type SDK
// i.e. SELECT * FROM database WHERE type = "SDK"
using var query = QueryBuilder.Select(SelectResult.All())
.From(DataSource.Collection(collection))
.Where(Expression.Property("type").EqualTo(Expression.String("SDK")));
// Alternatively, using SQL++, with _ referring to the database
using var sqlppQuery = collection.CreateQuery("SELECT * FROM _ WHERE type = 'SDK'");
// Run the query
var result = query.Execute();
Console.WriteLine($"Number of rows :: {result.AllResults().Count}");
// Create replicator to push and pull changes to and from the cloud
var targetEndpoint = new URLEndpoint(new Uri("ws://localhost:4984/getting-started-db"));
var replConfig = new ReplicatorConfiguration(targetEndpoint);
replConfig.AddCollection(database.GetDefaultCollection());
// Add authentication
replConfig.Authenticator = new BasicAuthenticator("john", "pass");
// Create replicator
var replicator = new Replicator(replConfig);
replicator.AddChangeListener((sender, args) =>
{
if (args.Status.Error != null) {
Console.WriteLine($"Error :: {args.Status.Error}");
}
});
replicator.Start();
// Later, stop and dispose the replicator *before* closing/disposing the database
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-android34.0 is compatible. net8.0-browser was computed. net8.0-ios was computed. net8.0-ios17.2 is compatible. net8.0-maccatalyst was computed. net8.0-maccatalyst17.2 is compatible. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows10.0.19041 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. monoandroid10.0 is compatible. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. xamarinios10 is compatible. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Couchbase.Lite.Support.NetDesktop (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
- System.Collections.Immutable (>= 6.0.0)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
- System.Collections.Immutable (>= 6.0.0)
-
MonoAndroid 10.0
- Couchbase.Lite.Support.Android (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
- System.Collections.Immutable (>= 6.0.0)
- Xamarin.Essentials (>= 1.7.4)
-
net6.0
- Couchbase.Lite.Support.NetDesktop (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
-
net8.0-android34.0
- Couchbase.Lite.Support.Android (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
-
net8.0-ios17.2
- Couchbase.Lite.Support.iOS (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
-
net8.0-maccatalyst17.2
- Couchbase.Lite.Support.iOS (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
-
net8.0-windows10.0.19041
- Couchbase.Lite.Support.NetDesktop (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
-
Xamarin.iOS 1.0
- Couchbase.Lite.Support.iOS (= 3.2.0-beta.2)
- Newtonsoft.Json (>= 13.0.1)
- SerialQueue (>= 2.1.0)
- SimpleInjector (>= 5.2.1 && < 6.0.0)
- System.Collections.Immutable (>= 6.0.0)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on Couchbase.Lite:
| Package | Downloads |
|---|---|
|
MvvX.Plugins.CouchBaseLite
This package contains the 'CouchBaseLite' plugin for MvvmCross. |
|
|
Couchbase.Lite.Listener
Provides Couchbase Lite with a self-hosted REST API. |
|
|
KidoZen
This package contains the KidoZen SDK assemblies. |
|
|
NoSqlRepositories.CouchBaseLite
This package is designed for Couchbase lite |
|
|
Linq2CouchBaseLiteExpression
This package let you create linq queries to querying a couchbase lite database |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Couchbase.Lite:
| Repository | Stars |
|---|---|
|
stoveproject/Stove
Domain Driven Design oriented application framework, meets CRUD needs
|
|
|
cmendible/dotnetcore.samples
.NET Core Samples - Code it Yourself...
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.2.4 | 9,786 | 6/12/2025 | |
| 3.2.3 | 1,205 | 4/30/2025 | |
| 3.2.2 | 5,250 | 3/14/2025 | |
| 3.2.1 | 15,340 | 11/13/2024 | |
| 3.2.0 | 17,414 | 8/30/2024 | |
| 3.2.0-beta.2 | 238 | 5/16/2024 | |
| 3.1.10 | 4,331 | 11/25/2024 | |
| 3.1.9 | 1,763 | 8/9/2024 | |
| 3.1.7 | 1,208 | 5/1/2024 | |
| 3.1.6 | 8,450 | 3/6/2024 | |
| 3.1.3 | 60,682 | 11/16/2023 | |
| 3.1.1 | 7,743 | 7/18/2023 | |
| 3.1.0 | 3,382 | 4/27/2023 | |
| 3.0.15 | 642 | 11/6/2023 | |
| 3.0.12 | 1,480 | 6/26/2023 | |
| 3.0.8 | 4,361 | 2/8/2023 | |
| 3.0.2 | 15,926 | 8/2/2022 | |
| 3.0.0 | 50,248 | 2/22/2022 | |
| 3.0.0-beta02 | 1,179 | 10/19/2021 | |
| 3.0.0-beta01 | 1,128 | 9/21/2021 | |
| 2.8.6 | 17,810 | 8/3/2021 | |
| 2.8.4 | 22,974 | 3/2/2021 | |
| 2.8.2 | 12,516 | 11/20/2020 | |
| 2.8.0 | 9,571 | 9/30/2020 | |
| 2.7.1 | 27,366 | 4/17/2020 | |
| 2.7.0 | 8,372 | 1/16/2020 | |
| 2.6.4 | 1,780 | 2/11/2020 | |
| 2.6.0 | 25,153 | 8/27/2019 | |
| 2.5.3 | 3,236 | 7/31/2019 | |
| 2.5.2 | 2,926 | 7/3/2019 | |
| 2.5.0 | 29,577 | 4/30/2019 | |
| 2.1.5 | 1,902 | 5/23/2019 | |
| 2.1.2 | 36,687 | 11/16/2018 | |
| 2.1.1 | 4,952 | 10/5/2018 | |
| 2.1.0 | 3,319 | 8/30/2018 | |
| 2.0.3 | 30,617 | 6/5/2018 | |
| 2.0.2 | 2,528 | 6/1/2018 | |
| 2.0.0.1 | 4,026 | 4/12/2018 | |
| 2.0.0 | 5,112 | 4/11/2018 | |
| 1.4.4 | 8,376 | 10/17/2018 | |
| 1.4.1 | 41,592 | 11/15/2017 | |
| 1.4.0 | 12,374 | 3/6/2017 | |
| 1.3.1 | 9,669 | 9/13/2016 | |
| 1.3.0 | 15,712 | 8/4/2016 | |
| 1.2.1.1 | 7,345 | 4/26/2016 | |
| 1.2.1 | 3,351 | 4/26/2016 | |
| 1.2.0.3 | 6,883 | 2/9/2016 | |
| 1.2.0 | 7,323 | 2/4/2016 | |
| 1.1.2 | 6,399 | 10/2/2015 | |
| 1.1.1.1 | 4,663 | 8/28/2015 | |
| 1.1.0.1 | 3,701 | 6/18/2015 | |
| 1.1.0 | 3,088 | 6/18/2015 | |
| 1.1.0-pre1 | 2,281 | 5/12/2015 | |
| 1.1.0-pre | 2,374 | 5/12/2015 | |
| 1.0.4.1 | 3,996 | 1/20/2015 | |
| 1.0.0 | 3,545 | 10/9/2014 | |
| 0.9.7.1 | 3,576 | 10/3/2014 | |
| 0.9.7 | 2,487 | 10/3/2014 | |
| 0.9.6 | 2,659 | 10/2/2014 | |
| 0.9.5 | 2,734 | 9/23/2014 | |
| 0.9.5-pre9 | 2,292 | 9/22/2014 | |
| 0.9.5-pre8 | 2,293 | 9/21/2014 | |
| 0.9.5-pre7 | 2,336 | 9/20/2014 | |
| 0.9.5-pre6 | 2,271 | 9/20/2014 | |
| 0.9.5-pre5 | 2,323 | 9/20/2014 | |
| 0.9.5-pre4 | 2,345 | 9/20/2014 | |
| 0.9.5-pre3 | 3,141 | 9/19/2014 | |
| 0.9.5-pre2 | 2,373 | 9/16/2014 | |
| 0.9.5-pre10 | 2,252 | 9/22/2014 | |
| 0.9.5-pre | 2,648 | 9/11/2014 |