Turso.Data.Sqlite 0.7.0-pre.10

This is a prerelease version of Turso.Data.Sqlite.
dotnet add package Turso.Data.Sqlite --version 0.7.0-pre.10
                    
NuGet\Install-Package Turso.Data.Sqlite -Version 0.7.0-pre.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Turso.Data.Sqlite" Version="0.7.0-pre.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Turso.Data.Sqlite" Version="0.7.0-pre.10" />
                    
Directory.Packages.props
<PackageReference Include="Turso.Data.Sqlite" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Turso.Data.Sqlite --version 0.7.0-pre.10
                    
#r "nuget: Turso.Data.Sqlite, 0.7.0-pre.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Turso.Data.Sqlite@0.7.0-pre.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Turso.Data.Sqlite&version=0.7.0-pre.10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Turso.Data.Sqlite&version=0.7.0-pre.10&prerelease
                    
Install as a Cake Tool

Turso .NET

ADO.NET bindings for Turso local databases.

The Turso.Data.Sqlite package includes both a SQLite-compatible Turso.Data.Sqlite facade and Turso-specific System.Data.Common types such as TursoConnection, TursoCommand, TursoDataReader, TursoParameter, TursoTransaction, and TursoFactory.

Install

dotnet add package Turso.Data.Sqlite

Application code only needs to reference Turso.Data.Sqlite.

The package targets net8.0, net9.0, and net10.0.

Getting started

using Turso;

using var connection = new TursoConnection("Data Source=:memory:");
connection.Open();

connection.ExecuteNonQuery("CREATE TABLE t(a, b)");
var rowsAffected = connection.ExecuteNonQuery("INSERT INTO t(a, b) VALUES (1, 2), (3, 4)");
Console.WriteLine($"RowsAffected: {rowsAffected}");

using var command = connection.CreateCommand();
command.CommandText = "SELECT * FROM t";
using var reader = command.ExecuteReader();
while (reader.Read())
{
    var a = reader.GetInt32(0);
    var b = reader.GetInt32(1);
    Console.WriteLine($"Value1: {a}, Value2: {b}");
}

ADO.NET usage

Code written against DbConnection can use TursoConnection directly:

using System.Data.Common;
using Turso;

await using DbConnection connection = new TursoConnection("Data Source=app.db");
connection.Open();

await using var command = connection.CreateCommand();
command.CommandText = "SELECT $value";
var parameter = command.CreateParameter();
parameter.ParameterName = "$value";
parameter.Value = 42;
command.Parameters.Add(parameter);

var value = command.ExecuteScalar();

Provider factories are available through TursoFactory.Instance:

DbProviderFactory factory = TursoFactory.Instance;
using var connection = factory.CreateConnection();
connection!.ConnectionString = "Data Source=:memory:";
connection.Open();

Migrating from Microsoft.Data.Sqlite

For common embedded SQLite usage, Turso.Data.Sqlite exposes a SQLite-compatible facade over the Turso engine:

- using Microsoft.Data.Sqlite;
+ using Turso.Data.Sqlite;

- using var connection = new SqliteConnection("Data Source=app.db");
+ using var connection = new SqliteConnection("Data Source=app.db");

Supported common connection string keywords include:

Keyword Notes
Data Source Database path or :memory:. Aliases include DataSource and Filename.
Mode Parsed and preserved for compatibility.
Cache Parsed and preserved for compatibility.
Foreign Keys Parsed and preserved for compatibility.
Recursive Triggers Parsed and preserved for compatibility.
Default Timeout Used as the default command timeout. Aliases include Command Timeout.
Pooling Parsed and preserved for compatibility.
Vfs Parsed and preserved for compatibility.
Encryption Cipher Turso local encryption cipher.
Encryption Key Hex-encoded encryption key used with Encryption Cipher.

SQLite-compatible facade coverage

  • Turso.Data.Sqlite is the migration-oriented facade. It includes SQLite-style connection strings, commands, readers, schema metadata, transactions and savepoints, backup, SQL-backed blob streams, scalar and aggregate UDFs, custom collations, and disabled-by-default extension loading.
  • Raw SQLitePCL sqlite3* handle interop is intentionally unsupported. SqliteConnection.Handle returns null rather than exposing a fake SQLite handle.
  • PRAGMA read_uncommitted is tracked as connection-local state for API compatibility, but Turso does not currently implement SQLite shared-cache dirty reads.
  • SqliteBlob preserves fixed-length blob stream behavior through SQL reads and writes. It is not yet backed by a native incremental-blob storage handle.
  • SQLite virtual-table modules such as FTS3/FTS5 are not built in unless provided by a Turso extension/module.
  • Async methods currently use the base ADO.NET behavior rather than a dedicated async native path.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0-pre.10 105 6/22/2026