Rqlite 1.1.1

dotnet add package Rqlite --version 1.1.1
                    
NuGet\Install-Package Rqlite -Version 1.1.1
                    
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="Rqlite" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rqlite" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Rqlite" />
                    
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 Rqlite --version 1.1.1
                    
#r "nuget: Rqlite, 1.1.1"
                    
#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 Rqlite@1.1.1
                    
#: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=Rqlite&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Rqlite&version=1.1.1
                    
Install as a Cake Tool

Rqlite .NET Client

GitHub release (latest SemVer including pre-releases) Nuget GitHub

Test Publish

Unofficial .NET client for Rqlite, download NuGet package.

Documentation (including API explorer) is available here.

Features

  • Fully asynchronous throughout
  • Configure multiple named connections in settings
  • Execute (e.g. INSERT), Query and Scalar support
  • Return query results as objects
  • Use parameters with queries
  • Support for transactions and multiple statements

Getting Started

The simplest way to start testing is to use Docker:

# in a temporary directory of your choice
$ git checkout https://github.com/bfren/rqlite .
$ chmod +x run.sh
$ ./run.sh

# in a new terminal
$ dotnet run --project apps/ReadmeApp

This will execute the code below (taken from ReadmeApp's Project.cs file). You can see additional options and code in the ConsoleApp project.

// register Rqlite with dependency injection
var (app, log) = Jeebs.Apps.Host.Create(args, (ctx, services) => services.AddRqlite());

// get IRqliteClientFactory instance
var factory = app.Services.GetRequiredService<IRqliteClientFactory>();

// create default IRqliteClient, listening on http://localhost:4001
using var client = factory.CreateClient();

// create a table
await client.ExecuteAsync("DROP TABLE IF EXISTS foo");
await client.ExecuteAsync("CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT, age INTEGER)");

// 0: insert a row using parameters
var sql0 = "INSERT INTO foo(name, age) VALUES(:name, :age)";
var param0 = new { name = "Fred", age = 42 };
var query0 = await client.ExecuteAsync(sql0, param0);
query0.Audit(
	fFail: e => log.Err(e.Message),
	fOk: x => Console.WriteLine("Inserted record {0}.", x.Select(r => r.LastInsertId).First())
);
// Output: 'Inserted record 1.'

// 1: query the database using parameters
var sql1 = "SELECT * FROM foo WHERE name = :name";
var param1 = new { name = "Fred" };
var query1 = await client.QueryAsync<Person>(sql1, param1);
query1.Audit(
	fFail: e => log.Err(e.Message),
	fOk: x => Console.WriteLine("{0} is {1}.", x.First().Name, x.First().Age)
);
// Output: 'Fred is 42.'

// 2: get value as a simple type
var sql2 = "SELECT age FROM foo WHERE name = :name";
var query2 = await client.GetScalarAsync<int>(sql2, param1);
query2.Audit(
	fFail: e => log.Err(e.Message),
	fOk: x => Console.WriteLine("Fred is {0}.", x)
);
// Output: 'Fred is 42.'

// 3: map results to a complex type
var query3 = await client.QueryAsync<Person>(sql1, param1);
query3.Audit(
	fFail: e => log.Err(e.Message),
	fOk: x => Console.WriteLine("Found {0}.", x.First())
);
// Output: 'Found Person { Id = 1, Name = Fred, Age = 42 }.'

// 4: insert multiple rows at once using tuples
var param2 = new { name = "Bella", age = 31 };
var param3 = new { name = "Alex", age = 59 };
var query4 = await client.ExecuteAsync(
	(sql0, param2),
	(sql0, param3)
);
query4.Audit(
	fFail: e => log.Err(e.Message),
	fOk: x => Console.WriteLine("Inserted records {0}.", string.Join(", ", x.Select(r => r.LastInsertId)))
);
// Output: 'Inserted records 2, 3.'

internal sealed record Person(int Id, string Name, int Age);

Licence

MIT

Copyright (c) 2023-2026 bfren (unless otherwise stated)

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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rqlite:

Package Downloads
Jeebs.Data.Clients.Rqlite

Jeebs.Data.Clients.Rqlite library

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 61 2/17/2026
1.1.0 111 2/11/2026
1.0.1 87 2/8/2026
1.0.0 91 1/27/2026
1.0.0-beta.26012501 43 1/25/2026
1.0.0-beta.25112601 153 11/26/2025
1.0.0-beta.25101701 107 10/17/2025
1.0.0-beta.25082001 156 8/20/2025
1.0.0-beta.25070402 128 7/4/2025
1.0.0-beta.25070401 112 7/4/2025
1.0.0-beta.25022801 179 2/28/2025
1.0.0-beta.24111501 104 11/15/2024
1.0.0-beta.24101801 138 10/18/2024
1.0.0-beta.24073001 97 7/30/2024
1.0.0-beta.24060601 163 6/6/2024
1.0.0-beta.24042401 109 4/24/2024
1.0.0-beta.24040501 117 4/6/2024
1.0.0-beta.24032302 99 3/23/2024
1.0.0-beta.23092301 140 9/23/2023
1.0.0-beta.23071402 169 7/14/2023
Loading failed