PureQL.CSharp.Model.Graph.Neo4j.Deletion
0.1.0-preview.0.1.0
This is a prerelease version of PureQL.CSharp.Model.Graph.Neo4j.Deletion.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PureQL.CSharp.Model.Graph.Neo4j.Deletion --version 0.1.0-preview.0.1.0
NuGet\Install-Package PureQL.CSharp.Model.Graph.Neo4j.Deletion -Version 0.1.0-preview.0.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.Deletion" Version="0.1.0-preview.0.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.Deletion" Version="0.1.0-preview.0.1.0" />
<PackageReference Include="PureQL.CSharp.Model.Graph.Neo4j.Deletion" />
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.Deletion --version 0.1.0-preview.0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PureQL.CSharp.Model.Graph.Neo4j.Deletion, 0.1.0-preview.0.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.Deletion@0.1.0-preview.0.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.Deletion&version=0.1.0-preview.0.1.0&prerelease
#tool nuget:?package=PureQL.CSharp.Model.Graph.Neo4j.Deletion&version=0.1.0-preview.0.1.0&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PureQL.CSharp.Model.Graph.Neo4j.Deletion
Deletes PureQL query graphs stored in Neo4j.
Overview
PureQL.CSharp.Model.Graph.Neo4j.Deletion is the deletion package of the PureQL.CSharp.Model.Graph family. A query stored by PureQL.CSharp.Model.Graph is a graph of Nodes that all carry the query's id as queryId; deleting the query detaches and deletes every one of them.
Public API
Namespace PureQL.CSharp.Model.Graph.Neo4j.Deletion:
| Name | Description |
|---|---|
DeleteByIdStatement |
sealed record DeleteByIdStatement(Guid Id); Value is the Neo4j.Driver.Query MATCH (n:Node {queryId: $id}) DETACH DELETE n |
DeleteByIdsStatement |
sealed record DeleteByIdsStatement(IReadOnlyCollection<Guid> Ids); Value is the Neo4j.Driver.Query MATCH (n:Node) WHERE n.queryId IN $ids DETACH DELETE n |
DeletedQuery |
sealed record DeletedQuery(IAsyncQueryRunner Runner, Guid Id); ApplyAsync runs DeleteByIdStatement on the runner |
DeletedQueries |
sealed record DeletedQueries(IAsyncQueryRunner Runner, IReadOnlyCollection<Guid> Ids); ApplyAsync runs DeleteByIdsStatement on the runner |
DeletedQueryOf |
sealed record DeletedQueryOf(INeo4jStoredQueries Store, Guid Id); ApplyAsync opens a session on Store.Driver against Store.Database and runs DeletedQuery in ExecuteWriteAsync |
DeletedQueriesOf |
sealed record DeletedQueriesOf(INeo4jStoredQueries Store, IReadOnlyCollection<Guid> Ids); the same for DeletedQueries |
- Ids are passed in the Guid "D" format, as the Graph package writes
queryId. - Deleting what is not stored is a no-op: an unknown id matches nothing, and an empty set deletes nothing.
DeletedQueryandDeletedQueriesrun on anyIAsyncQueryRunner, so a deletion composes with other operations inside one transaction; the...Ofrecords run in a write transaction of their own, which the driver retries on transient failures.- The driver's
RunAsynctakes no cancellation token:ApplyAsyncchecks its token before opening the session and before sending the statement.
Usage
using Neo4j.Driver;
using PureQL.CSharp.Model.Graph.Neo4j.Abstractions;
using PureQL.CSharp.Model.Graph.Neo4j.Deletion;
await using IDriver driver = GraphDatabase.Driver(
"neo4j://localhost:7687",
AuthTokens.Basic("neo4j", "password")
);
INeo4jStoredQueries store = new Neo4jStoredQueries(driver);
// One query, in a transaction of its own:
await new DeletedQueryOf(store, queryId).ApplyAsync();
// The queries of a dashboard, in one statement:
await new DeletedQueriesOf(store, [firstQueryId, secondQueryId]).ApplyAsync();
// Or as part of a larger transaction:
await using IAsyncSession session = driver.AsyncSession(
builder => builder.WithDatabase(store.Database)
);
await session.ExecuteWriteAsync(
async transaction =>
{
await new DeletedQuery(transaction, queryId).ApplyAsync();
// ...other operations on the same transaction
}
);
Design Principles
- Statements, then execution — the Cypher is a value you can inspect or run yourself; the executing records only send it
- AOT-compatible —
IsAotCompatible=true
Dependencies
PureQL.CSharp.Model.Graph0.1.0-preview.1.0.0—GraphLabels,GraphPropertiesPureQL.CSharp.Model.Graph.Neo4j.Abstractions0.1.0-preview.1.0.0—INeo4jStoredQueriesNeo4j.Driver6.5.1
Target Frameworks
- .NET 11
Installation
dotnet add package PureQL.CSharp.Model.Graph.Neo4j.Deletion
Related packages
PureQL.CSharp.Model.Graph— maps aPureQLQueryto a property graph and back, without a driverPureQL.CSharp.Model.Graph.Neo4j.Abstractions— the stored-queries contract the Neo4j packages sharePureQL.CSharp.Model.Graph.Neo4j.Creation— constraints and indexesPureQL.CSharp.Model.Graph.Neo4j.Insertion— writes a queryPureQL.CSharp.Model.Graph.Neo4j.Querying— reads queries backPureQL.CSharp.Model.Graph.Neo4j.Updating— replaces a query in one transactionPureQL.CSharp.Model.Graph.Neo4j.Existence— checks the schema and queries existPureQL.CSharp.Model.Graph.Neo4j.Destruction— drops the schema and every stored queryPureQL.CSharp.Model.Graph.Neo4j.Migration— migrates stored graphs between model versions
| Product | Versions 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.
-
net11.0
- Neo4j.Driver (>= 6.5.1)
- PureQL.CSharp.Model.Graph (>= 0.1.0-preview.1.0.0)
- PureQL.CSharp.Model.Graph.Neo4j.Abstractions (>= 0.1.0-preview.1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PureQL.CSharp.Model.Graph.Neo4j.Deletion:
| Package | Downloads |
|---|---|
|
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.0.2.0 | 95 | 11/11/2026 |
| 0.1.0-preview.0.1.0 | 85 | 11/9/2026 |