Skip to content
potluckdb

Install for .NET

Python · Node · Go · Rust · Swift · Dart · JVM · .NET · C++ · Objective-C

See Concepts for the runtime, remote, and synchronization terms used on this page.

Use a .NET version that supports .NET Standard 2.0 on macOS, Linux, or Windows.

For iOS and Android, use .NET MAUI.

Add the package with this command.

Terminal window
dotnet add package potluckdb

The package contains the managed API that .NET code calls. Its potluckdb.runtime.* dependencies contain the native runtime and storage libraries. Each platform family has one package. A runtime identifier selects the package for your target. You need no other installation steps.

A remote is the shared copy of a database that devices synchronize with. The quickstart uses a directory as its remote.

  1. To use a storage service, replace the directory constructor with a storage service constructor.
using PotluckDB;
var remote = Storage.FromS3(new S3Options("my-bucket", "notes", region: "eu-west-1"));
var db = Database.Open("app.potluckdb", remote);

The rest of the program stays the same. The Google Cloud Storage and Azure Blob Storage constructors use the same form.

A credential chain tries the storage service’s standard sources for credentials. If you do not pass credentials, the constructor uses these sources:

  • Environment variables.
  • A profile.
  • The host’s identity.
  1. Configure the credential chain before you open the database.

The storage reference gives each constructor’s signature and parameters, including endpoint, region, and forcePathStyle.

Analytical reads use DuckDB, a separate SQL engine for analysis. The core package does not contain DuckDB.

  1. Download your platform’s library from the analytics engine page.
  2. Specify the library in the open options.
var options = new OpenOptions(analyticalEngine: "/opt/potluckdb/lib/libduckdb.so");

The analytics engine page lists each file’s URL and digest. POTLUCKDB_DUCKDB_LIBRARY selects a library for every database in the process.

Without a license key, potluckdb uses a trial. The licensing page explains the trial’s length and start, license key sources, and purchase steps.

Continue with the quickstart.