DoltHub.Doltlite
0.50.6
dotnet add package DoltHub.Doltlite --version 0.50.6
NuGet\Install-Package DoltHub.Doltlite -Version 0.50.6
<PackageReference Include="DoltHub.Doltlite" Version="0.50.6" />
<PackageVersion Include="DoltHub.Doltlite" Version="0.50.6" />
<PackageReference Include="DoltHub.Doltlite" />
paket add DoltHub.Doltlite --version 0.50.6
#r "nuget: DoltHub.Doltlite, 0.50.6"
#:package DoltHub.Doltlite@0.50.6
#addin nuget:?package=DoltHub.Doltlite&version=0.50.6
#tool nuget:?package=DoltHub.Doltlite&version=0.50.6
DoltHub.Doltlite
DoltLite for .NET: SQLite with
Git-style version control — branch, commit, merge, and diff your relational
data. This package bundles the libdoltlite native engine per platform and
plugs it into SQLitePCLRaw, the
layer the .NET SQLite ecosystem already builds on — so
Microsoft.Data.Sqlite.Core, EF Core's Sqlite provider, and Dapper work
unchanged on top of it.
Install
dotnet add package DoltHub.Doltlite
dotnet add package Microsoft.Data.Sqlite.Core
Use Microsoft.Data.Sqlite.Core, not Microsoft.Data.Sqlite: the non-Core
package pins SQLitePCLRaw to its own bundled stock engine.
Use
using DoltHub.Doltlite;
using Microsoft.Data.Sqlite;
Doltlite.Init(); // once at startup, before the first connection
using var conn = new SqliteConnection("Data Source=app.db");
conn.Open();
var create = conn.CreateCommand();
create.CommandText = "CREATE TABLE users(id INTEGER PRIMARY KEY, name TEXT)";
create.ExecuteNonQuery();
// Version control is plain SQL on the same connection.
var commit = conn.CreateCommand();
commit.CommandText = "SELECT dolt_commit('-A', '-m', 'add users table')";
commit.ExecuteScalar();
With EF Core, configure the provider as usual
(options.UseSqlite("Data Source=app.db")) after calling Doltlite.Init(),
and reach version control through
db.Database.ExecuteSqlRaw("SELECT dolt_commit(...)"). Every DoltLite
feature — branches, merges, the dolt_log/dolt_diff/dolt_branches
tables, remotes — is reachable through SQL; see the
DoltLite documentation.
Requirements
- .NET 6.0 or later.
- Bundled native engines:
linux-x64,linux-arm64,osx-arm64, andwin-x64. For anything else, setDOLTLITE_NET_LIBto the path of alibdoltliteshared library built from source.
Source
The package source lives in
dolthub/doltlite under
packaging/nuget/; send issues and pull requests there.
| 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. 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. |
-
net6.0
- SQLitePCLRaw.core (>= 2.1.10)
- SQLitePCLRaw.provider.dynamic_cdecl (>= 2.1.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.