/rqlite-dotnet

.NET client for rqlite (distributed sqlite)

Primary LanguageC#MIT LicenseMIT

rqlite-dotnet

Nuget (with prereleases) GitHub

.NET client for Rqlite - lightweight distributed database.

Features

It supports the following features through Data API:

  • Execute statements
  • Query data
  • Parametrized statements/queries

Example

var client = new RqliteClient("http://localhost:4001"); //Assuming you have rqlite running on that port locally
var version = await client.Ping();

var queryResults = await client.Query("select * from foo");

var executeResults = await client.Execute("insert into foo (name) values('test')");

There is also a basic ORM client similar to Dapper:

public class FooResultDto
{
    public int Id { get; set; }
    public string Name { get; set; }
}

var rqClient = new RqliteOrmClient("http://localhost:6000");

var queryresults = await rqClient.Query<FooResultDto>("select * from foo"); //Returns List<FooResultDto>

You can see more examples in unit tests. NB: please report performance problems if any.