Cyphoid 0.8.0

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

C# Cyphoid parser for Cypher query language

This project implements a Cypher parser that can be used in C# to query any sort of graph backend.

Cyphoid expects developers to implement various operators that interact with their own backend.

Features

  • Implements a subset of Cyhper.
  • Fast parser implementation with Antlr.
  • In-memory implementation of query plans for any backend.

Example usage

// This is your implementation of the backend
IOperatorFactory factory = new OperatorFactory(Graph);

// Query input
var input = "MATCH (n:city) RETURN n.name LIMIT 1";

// Parse query
ICypherParser parser = new CypherAstParser();
var queryNode = parser.ParseQuery(input);

// Print parsed query
var prettyPrint = queryNode.PrettyPrint();

// Build logical query plan
var plan = queryNode.BuildQueryPlan();

// Build executable query plan (using your backend)
var execution = plan.BuildExecutionPlan(factory);

// Prepare query context
var context = new QueryContext(queryNode.RowSize);

// Execute actual query
var result = await execution.ExecuteAsync(context).ToListAsync();

Architecture

Source Code
   ↓
ANTLR Lexer/Parser
   ↓
AST Builder (Visitor)
   ↓
Abstract Syntax Tree (AST)
   ↓
Cypher logical plan
   ↓
Cypher executable query plan
   ↓
<Your implementation>

Backend implementation

Guidance for third-party backends is in BACKEND_GUIDE.md.

Developer instructions

For developing the Cyphoid library.

Building a release

  1. Update version number and more in Cyphoid.Core.csproj.
  2. Build in release mode to generate NuGet package.
  3. Upload package Cyphoid.N.N.N.nupkg from Src\Cyphoid.Core\bin\Release\ folder.

ANTLR

The compiler is built using Antlr. See https://github.com/antlr/antlr4/blob/master/doc/getting-started.md

Antlr is made with Java. There are some Windows tools that make setup easier. See https://github.com/antlr/antlr4-tools

Run ANTLR Compiler

cd into "Cyphoid.Core/Antlr".

java org.antlr.v4.Tool -Dlanguage=CSharp -visitor -o Generated Cypher.g4

Manual Antlr installation

Install Java (version 1.7 or higher) - NOT from java.com but rather one of the newer SDKs.

Download antlr-4.13.2-complete.jar (or whatever version) from https://www.antlr.org/download.html Save to your directory for 3rd party Java libraries, say C:\Javalib

Add antlr-4.13.2-complete.jar to CLASSPATH, either: Permanently: Using System Properties dialog > Environment variables > Create or append to CLASSPATH variable Temporarily, at command line.

Product 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.0 121 4/8/2026
0.7.2 105 4/6/2026
0.7.1 110 4/6/2026
0.7.0 114 4/6/2026
0.6.0 105 3/26/2026
0.5.0 108 3/22/2026
0.4.0 102 3/22/2026
0.3.0 100 3/19/2026
0.2.0 100 3/19/2026
0.1.0 99 3/19/2026

0.8.0 - Add unidirectional pattern -[]-.