LoraDb.Client 0.2.0

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

LoraDb.Client

CI NuGet License: MIT + BUSL-1.1 .NET

A modern .NET client for LoraDB — a graph database with a Cypher-like query language — supporting both HTTP and embedded (Rust FFI via P/Invoke) modes.


✨ Features

Capability Details
🚀 Async-first ExecuteAsync / ExecuteRowsAsync<T> returning IAsyncEnumerable
🔒 Parameterized queries Safe, strongly-typed parameter binding
🔌 Dual transport HTTP (lora-server) or embedded (lora_ffi) — swap at startup
💉 DI-ready AddLoraDb(…) extension for IServiceCollection
📦 CRUD helpers CreateNodeAsync, FindNodesAsync, UpdateNodesAsync, …
🗂️ Batch execution LoraDbBatch — sequential, fail-fast multi-statement runner
🔧 Management API Health, Explain, Profile, Snapshot, WAL status & truncate
🎯 Multi-target net10.0 and netstandard2.1

📦 Installation

dotnet add package LoraDb.Client

⚡ Quick start

using LoraDb.Client;

await using var client = LoraDbClient.CreateHttp(new Uri("http://127.0.0.1:4747/"));

UserNameRow? first = null;
await foreach (var row in client.ExecuteRowsAsync<UserNameRow>(
                   "MATCH (u:User) WHERE u.name = $name RETURN u.name AS name",
                   new Dictionary<string, object?> { ["name"] = "Alice" }))
{
    first = row;
    break;
}

var name = first?.Name;

public sealed class UserNameRow
{
    public string Name { get; init; } = string.Empty;
}

Need low-level JSON access? ExecuteAsync returns LoraDbQueryResult with Root.


🔌 Runtime modes

HTTP mode

await using var client = LoraDbClient.CreateHttp(new Uri("http://127.0.0.1:4747/"));

Embedded mode

// In-memory (ephemeral)
await using var client = LoraDbClient.CreateEmbedded();

// Persistent on-disk
await using var client = LoraDbClient.CreateEmbedded(new LoraDbEmbeddedOpenOptions
{
    DatabaseName = "app",
    DatabaseDirectory = "/var/lib/loradb",
});

Embedded mode uses lora_ffi and expects these exported symbols:

  • lora_db_new, lora_db_new_named, lora_db_new_with_wal
  • lora_db_free
  • lora_db_execute_json, lora_db_explain_json, lora_db_profile_json
  • lora_db_save_snapshot, lora_db_load_snapshot
  • lora_string_free

📖 Usage documentation

For a full guide covering HTTP mode, embedded mode, DI setup, result handling, and troubleshooting, see docs/USAGE.md.


🛠️ Development

dotnet restore LoraDb.Client.slnx
dotnet build LoraDb.Client.slnx
dotnet test LoraDb.Client.Tests/LoraDb.Client.Tests.csproj

Integration tests

Integration tests exercise real HTTP and embedded modes and require:

Variable Description
LORADB_RUN_INTEGRATION_TESTS=1 Opt-in to run integration tests
LORADB_FFI_LIBRARY_PATH Absolute path to lora_ffi binary (embedded mode)
LORADB_HTTP_IMAGE (optional) Custom server image (defaults to ghcr.io/lora-db/lora-server:latest)
dotnet test LoraDb.Client.IntegrationTests/LoraDb.Client.IntegrationTests.csproj

Build/pin native lora_ffi

The pinned upstream version is tracked in LoraDb.Client.Native/lora-ffi.version.

# Build using the currently pinned upstream ref
./scripts/build-lora-ffi.sh

# Update to a new upstream ref and persist the pin
./scripts/build-lora-ffi.sh --ref <tag-or-commit> --update-pin

🤝 Contributing

See CONTRIBUTING.md for commit conventions, branch workflow, and PR guidelines.


🔒 Security

Please do not open a public issue for vulnerabilities. See SECURITY.md for the responsible disclosure process.


📄 License

Two licenses apply, depending on which part you use.

Part License
All C# source in this repo, and the managed assemblies in both packages MIT — Copyright © 2026 Harry Cordewener
The bundled lora_ffi native libraries (runtimes/*/native/) Business Source License 1.1 — Copyright LoraDB, Inc.

The native libraries are compiled from LoraDB, which is licensed under BUSL-1.1 (SPDX: BUSL-1.1), not an open source license. Change Date 2029-04-19, after which the Change License is Apache 2.0. The Additional Use Grant permits internal-business and non-production use but does not permit offering LoraDB as a database-as-a-service, hosted API, managed database platform, or substantially similar hosted service for third parties.

Both LoraDb.Client and LoraDb.Client.Native bundle these binaries, so the BUSL-1.1 terms apply to either package. Each package ships PACKAGE-LICENSE.md (the split) and THIRD-PARTY-NOTICES.md (the verbatim BUSL-1.1 text). Read them before use.

Versions 0.1.2 and earlier of both packages incorrectly declared MIT as the sole NuGet license expression.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 LoraDb.Client:

Package Downloads
LoraDb.Client.Native

RID-specific native lora_ffi binaries and the custom resolver for LoraDB's embedded transport. Install alongside LoraDb.Client to enable the embedded (in-process) mode without manually placing native libraries. The managed resolver is MIT; the bundled lora_ffi binaries are LoraDB, Inc. under Business Source License 1.1 — see PACKAGE-LICENSE.md and THIRD-PARTY-NOTICES.md in this package.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 134 7/27/2026
0.1.2 134 7/27/2026

## [0.2] — 2026-07-27 ### Bug Fixes - Declare BUSL-1.1 for bundled lora_ffi binaries instead of MIT ([#47](https://github.com/HarryCordewener/loradb-client/issues/47))