Skip to content
potluckdb

Start here

↑ ↓ Select↵ OpenEsc Close

potluckdb

Read and write a local SQLite database. Synchronize it through your own storage service.

Each install page ends with a link to the quickstart for that language.

Each device has one writable database. You can synchronize in both directions automatically or with an explicit API call. sync() reports a conflict as a returned value, not as an exception. Every SDK provides the same behavior. Concepts explains databases, remotes, and conflicts.

import potluckdb
remote = potluckdb.Remote.from_directory("shared-remote")
db = potluckdb.open("app.potluckdb", remote)
db.execute("CREATE TABLE IF NOT EXISTS note(id INTEGER PRIMARY KEY, body TEXT)")
db.execute("INSERT INTO note(body) VALUES(?)", ("hello",))
db.close()
remote.close()

These paths persist between runs, as they do in an application. On the second run, the program opens the database that the first run created. It creates the table only if the table does not exist. The runnable examples use temporary directories and remove them after each run. They start with an empty database, so they create their tables directly.

The reference has ten language versions. Compatibility maps fourteen languages to those versions. Each page links to its versions in the other languages.

PageWhat it tells you
InstallRequirements and installation steps for your language.
QuickstartA complete program that synchronizes two devices and resolves a conflict.
ConceptsThe database model, in the order that a program uses it.
Open and constructEvery call for opening a database or creating a remote.
ExamplesLonger programs that you can run.
PlatformsRequirements and examples for each operating system, including the browser.
FrameworksIntegration with each application framework.
Standard interfacesDB-API, JDBC, and ODBC access through one connection string.
FeaturesEvery capability and what it means for your application.
CompatibilitySupported platforms, languages, analytical engines, and remotes.
PerformanceOne measured run for each remote type.
Analytics engineThe DuckDB library that each platform loads for analytical reads.
ErrorsEvery error code, its category, and the action to take.
Before productionSettings to choose before you release your application.
Licensing and trialHow the trial and license keys work.

The documentation generator reads the code’s public API on every change. The tests run every example against the package that you install. These checks keep the reference and examples current.