Grafeo 0.5.22
dotnet add package Grafeo --version 0.5.22
NuGet\Install-Package Grafeo -Version 0.5.22
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="Grafeo" Version="0.5.22" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Grafeo" Version="0.5.22" />
<PackageReference Include="Grafeo" />
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 Grafeo --version 0.5.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Grafeo, 0.5.22"
#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 Grafeo@0.5.22
#: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=Grafeo&version=0.5.22
#tool nuget:?package=Grafeo&version=0.5.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Grafeo C# Bindings
C# bindings for the Grafeo graph database.
Quick Start
using Grafeo;
// Create an in-memory database
await using var db = GrafeoDB.Memory();
// Execute a GQL query
db.Execute("INSERT (:Person {name: 'Alix', age: 30})");
// Query with parameters
var result = db.ExecuteWithParams(
"MATCH (p:Person) WHERE p.name = $name RETURN p.name, p.age",
new Dictionary<string, object?> { ["name"] = "Alix" });
foreach (var row in result.Rows)
Console.WriteLine($"{row["p.name"]}: {row["p.age"]}");
// Async execution
var asyncResult = await db.ExecuteAsync("MATCH (p:Person) RETURN p");
// ACID transactions with auto-rollback
using var tx = db.BeginTransaction();
tx.Execute("INSERT (:Person {name: 'Gus'})");
tx.Execute("INSERT (:Person {name: 'Vincent'})-[:KNOWS]->(:Person {name: 'Jules'})");
tx.Commit(); // rolls back automatically if not reached
Building from Source
Build the Grafeo C library:
cargo build --release -p grafeo-cCopy the native library to the test directory:
- Windows:
copy target\release\grafeo_c.dll crates\bindings\csharp\tests\Grafeo.Tests\ - macOS:
cp target/release/libgrafeo_c.dylib crates/bindings/csharp/tests/Grafeo.Tests/ - Linux:
cp target/release/libgrafeo_c.so crates/bindings/csharp/tests/Grafeo.Tests/
- Windows:
Build and test:
cd crates/bindings/csharp dotnet build dotnet test
Requirements
- .NET 8.0 or later
grafeo_cnative library (built from thegrafeo-ccrate)
License
Apache-2.0
| Product | Versions 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 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.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.