PureQL.CSharp.Model.Graph.Neo4j.Abstractions 0.1.0-preview.1.1.0

This is a prerelease version of PureQL.CSharp.Model.Graph.Neo4j.Abstractions.
dotnet add package PureQL.CSharp.Model.Graph.Neo4j.Abstractions --version 0.1.0-preview.1.1.0
                    
NuGet\Install-Package PureQL.CSharp.Model.Graph.Neo4j.Abstractions -Version 0.1.0-preview.1.1.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="PureQL.CSharp.Model.Graph.Neo4j.Abstractions" Version="0.1.0-preview.1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PureQL.CSharp.Model.Graph.Neo4j.Abstractions" Version="0.1.0-preview.1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="PureQL.CSharp.Model.Graph.Neo4j.Abstractions" />
                    
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 PureQL.CSharp.Model.Graph.Neo4j.Abstractions --version 0.1.0-preview.1.1.0
                    
#r "nuget: PureQL.CSharp.Model.Graph.Neo4j.Abstractions, 0.1.0-preview.1.1.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 PureQL.CSharp.Model.Graph.Neo4j.Abstractions@0.1.0-preview.1.1.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=PureQL.CSharp.Model.Graph.Neo4j.Abstractions&version=0.1.0-preview.1.1.0&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PureQL.CSharp.Model.Graph.Neo4j.Abstractions&version=0.1.0-preview.1.1.0&prerelease
                    
Install as a Cake Tool

PureQL.CSharp.Model.Graph.Neo4j.Abstractions

The Neo4j stored-queries contract shared by the PureQL graph storage packages.

.NET build & test Build and Deploy NuGet License: MIT

Overview

PureQL.CSharp.Model.Graph.Neo4j.Abstractions is the small package that the Neo4j operation packages of the PureQL.CSharp.Model.Graph family share: one description of the Neo4j database holding PureQL query graphs and one record of a stored query. The operation packages depend on it instead of on each other, so a consumer can combine any of them over the same database.

Public API

Namespace PureQL.CSharp.Model.Graph.Neo4j.Abstractions:

Name Description
INeo4jStoredQueries A Neo4j database holding PureQL query graphs: the IDriver Driver connected to the server and the string Database name
Neo4jStoredQueries sealed record Neo4jStoredQueries(IDriver Driver, string Database), the implementation; new Neo4jStoredQueries(driver) uses Neo4jStoredQueries.DefaultDatabase, "neo4j", the only user database on Community edition
StoredQuery sealed record StoredQuery(Guid Id, PureQLQuery Query): a query as stored, with its id

Neo4jStoredQueries does not own its driver: whoever creates the IDriver disposes it.

How the operation packages use it

Each operation package exposes statements (a Neo4j.Driver.Query: Cypher text and parameters), records that run them on an IAsyncQueryRunner, and convenience records over INeo4jStoredQueries that open a session on Driver against Database themselves. Both IAsyncSession and IAsyncTransaction are IAsyncQueryRunners, so operations from different packages compose inside one transaction:

using Neo4j.Driver;
using PureQL.CSharp.Model;
using PureQL.CSharp.Model.Graph.Neo4j.Abstractions;

await using IDriver driver = GraphDatabase.Driver(
    "neo4j://localhost:7687",
    AuthTokens.Basic("neo4j", "password")
);
INeo4jStoredQueries store = new Neo4jStoredQueries(driver);

PureQLQuery query = /* any PureQL query */;
StoredQuery stored = new StoredQuery(Guid.NewGuid(), query);

// One package's convenience record opens the session itself:
await new InsertedQueryOf(store, stored).ApplyAsync();

// Or compose several operations in one transaction, here to swap it for another:
StoredQuery replacement = new StoredQuery(Guid.NewGuid(), /* another query */);
await using IAsyncSession session = driver.AsyncSession(
    builder => builder.WithDatabase(store.Database)
);
await session.ExecuteWriteAsync(
    async transaction =>
    {
        await new DeletedQuery(transaction, stored.Id).ApplyAsync();
        await new InsertedQuery(transaction, replacement).ApplyAsync();
    }
);

InsertedQueryOf, InsertedQuery and DeletedQuery come from PureQL.CSharp.Model.Graph.Neo4j.Insertion and PureQL.CSharp.Model.Graph.Neo4j.Deletion; this package itself contains no operation.

Design Principles

  • Contract only — no I/O; the records hold their values and nothing else
  • AOT-compatible — IsAotCompatible=true

Dependencies

Target Frameworks

  • .NET 11

Installation

dotnet add package PureQL.CSharp.Model.Graph.Neo4j.Abstractions
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on PureQL.CSharp.Model.Graph.Neo4j.Abstractions:

Package Downloads
PureQL.CSharp.Model.Graph.Neo4j.Insertion

Inserts PureQL query graphs into Neo4j: one query, one transaction, one batched Cypher statement.

PureQL.CSharp.Model.Graph.Neo4j.Deletion

Deletes PureQL query graphs from Neo4j by query id or by a set of ids.

PureQL.CSharp.Model.Graph.Neo4j.Querying

Reads PureQL query graphs from Neo4j by id, by ids or all, with structural lookups, rebuilding the PureQLQuery.

PureQL.CSharp.Model.Graph.Neo4j.Creation

Creates the Neo4j schema for PureQL query graphs: the uniqueness constraint and the indexes, applied idempotently.

PureQL.CSharp.Model.Graph.Neo4j.Updating

Replaces a stored PureQL query graph in Neo4j in one transaction.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.1.1.0 168 11/11/2026
0.1.0-preview.1.0.0 218 11/9/2026
0.1.0-preview.0.1.0 55 11/9/2026