Couchbase.Lite.Enterprise.Support.NetDesktop
3.2.1
Prefix Reserved
dotnet add package Couchbase.Lite.Enterprise.Support.NetDesktop --version 3.2.1
NuGet\Install-Package Couchbase.Lite.Enterprise.Support.NetDesktop -Version 3.2.1
<PackageReference Include="Couchbase.Lite.Enterprise.Support.NetDesktop" Version="3.2.1" />
paket add Couchbase.Lite.Enterprise.Support.NetDesktop --version 3.2.1
#r "nuget: Couchbase.Lite.Enterprise.Support.NetDesktop, 3.2.1"
// Install Couchbase.Lite.Enterprise.Support.NetDesktop as a Cake Addin #addin nuget:?package=Couchbase.Lite.Enterprise.Support.NetDesktop&version=3.2.1 // Install Couchbase.Lite.Enterprise.Support.NetDesktop as a Cake Tool #tool nuget:?package=Couchbase.Lite.Enterprise.Support.NetDesktop&version=3.2.1
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 | 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-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.0.0)
-
net6.0
- Microsoft.Win32.Registry (>= 5.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Couchbase.Lite.Enterprise.Support.NetDesktop:
Package | Downloads |
---|---|
Couchbase.Lite.Enterprise
A lightweight, document-oriented (NoSQL), syncable database engine for .NET |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
3.2.1 | 1,635 | 11/13/2024 | |
3.2.0 | 5,647 | 8/30/2024 | |
3.2.0-beta.2 | 183 | 5/16/2024 | |
3.1.10 | 216 | 11/25/2024 | |
3.1.9 | 1,629 | 8/9/2024 | |
3.1.7 | 9,473 | 5/1/2024 | |
3.1.6 | 9,046 | 3/6/2024 | |
3.1.3 | 14,000 | 11/16/2023 | |
3.1.1 | 10,559 | 7/18/2023 | |
3.1.0 | 1,140 | 4/27/2023 | |
3.0.15 | 3,643 | 11/6/2023 | |
3.0.12 | 34,920 | 6/26/2023 | |
3.0.8 | 22,661 | 2/8/2023 | |
3.0.2 | 25,702 | 8/2/2022 | |
3.0.0 | 29,573 | 2/22/2022 | |
3.0.0-beta02 | 3,073 | 10/19/2021 | |
3.0.0-beta01 | 666 | 9/21/2021 | |
2.8.6 | 60,068 | 8/3/2021 | |
2.8.4 | 35,372 | 3/2/2021 | |
2.8.2 | 90,839 | 11/20/2020 | |
2.8.0 | 2,101 | 9/30/2020 | |
2.7.1 | 19,189 | 4/17/2020 | |
2.7.0 | 14,013 | 1/16/2020 | |
2.6.4 | 1,032 | 2/11/2020 | |
2.6.0 | 4,705 | 8/27/2019 | |
2.5.3 | 3,891 | 7/31/2019 | |
2.5.2 | 1,116 | 7/3/2019 | |
2.5.0 | 1,670 | 4/30/2019 | |
2.1.5 | 1,024 | 5/23/2019 | |
2.1.2 | 5,313 | 11/16/2018 | |
2.1.1 | 2,887 | 10/5/2018 | |
2.1.0 | 1,576 | 8/30/2018 | |
2.0.3 | 1,497 | 6/5/2018 | |
2.0.2 | 1,496 | 6/1/2018 | |
2.0.0.1 | 1,641 | 4/12/2018 | |
2.0.0 | 1,638 | 4/12/2018 |