CypherQueryBuilder 1.3.0
See the version list below for details.
dotnet add package CypherQueryBuilder --version 1.3.0
NuGet\Install-Package CypherQueryBuilder -Version 1.3.0
<PackageReference Include="CypherQueryBuilder" Version="1.3.0" />
paket add CypherQueryBuilder --version 1.3.0
#r "nuget: CypherQueryBuilder, 1.3.0"
// Install CypherQueryBuilder as a Cake Addin #addin nuget:?package=CypherQueryBuilder&version=1.3.0 // Install CypherQueryBuilder as a Cake Tool #tool nuget:?package=CypherQueryBuilder&version=1.3.0
CypherQueryBuilder
CypherQueryBuilder Assembly
Namespaces
<a name='CypherQueryBuilder'></a>
CypherQueryBuilder Namespace
Classes
<a name='CypherQueryBuilder.DeleteQuery'></a>
DeleteQuery Class
public class DeleteQuery : CypherQueryBuilder.MatchQuery
Inheritance System.Object 🡒 Utility.Disposable 🡒 QueryBase 🡒 MatchQuery 🡒 DeleteQuery
Methods
<a name='CypherQueryBuilder.DeleteQuery.Compile()'></a>
DeleteQuery.Compile() Method
Compiles this instance to Cypher Query string.
public override string Compile();
Returns
System.String
Cypher Query string
<a name='CypherQueryBuilder.DeleteQuery.Delete_T_(T[])'></a>
DeleteQuery.Delete<T>(T[]) Method
Deletes the specified entities.
public override CypherQueryBuilder.DeleteQuery Delete<T>(params T[] entities)
where T : CypherQueryBuilder.Entity;
Type parameters
<a name='CypherQueryBuilder.DeleteQuery.Delete_T_(T[]).T'></a>
T
Parameters
<a name='CypherQueryBuilder.DeleteQuery.Delete_T_(T[]).entities'></a>
The entities to delete.
Returns
DeleteQuery
DeleteQuery
<a name='CypherQueryBuilder.DeleteQuery.Detach_T_(T[])'></a>
DeleteQuery.Detach<T>(T[]) Method
Detaches, i.e. delete with all the associated relations (if it is a node), the specified entities.
public override CypherQueryBuilder.DeleteQuery Detach<T>(params T[] entities)
where T : CypherQueryBuilder.Entity;
Type parameters
<a name='CypherQueryBuilder.DeleteQuery.Detach_T_(T[]).T'></a>
T
Parameters
<a name='CypherQueryBuilder.DeleteQuery.Detach_T_(T[]).entities'></a>
The entities to detache and delete.
Returns
DeleteQuery
DeleteQuery
<a name='CypherQueryBuilder.DeleteQuery.ReleaseResources()'></a>
DeleteQuery.ReleaseResources() Method
Releases the resources, used while disposing.
public override void ReleaseResources();
<a name='CypherQueryBuilder.MatchCreationQuery'></a>
MatchCreationQuery Class
public class MatchCreationQuery : CypherQueryBuilder.MatchQuery
Inheritance System.Object 🡒 Utility.Disposable 🡒 QueryBase 🡒 MatchQuery 🡒 MatchCreationQuery
Methods
<a name='CypherQueryBuilder.MatchCreationQuery.Compile()'></a>
MatchCreationQuery.Compile() Method
Compiles this instance to Cypher Query string.
public override string Compile();
Returns
System.String
Cypher Query string
<a name='CypherQueryBuilder.MatchQuery'></a>
MatchQuery Class
public class MatchQuery : CypherQueryBuilder.QueryBase
Inheritance System.Object 🡒 Utility.Disposable 🡒 QueryBase 🡒 MatchQuery
Derived
↳ DeleteQuery
↳ MatchCreationQuery
Methods
<a name='CypherQueryBuilder.MatchQuery.Compile()'></a>
MatchQuery.Compile() Method
Compiles this instance to Cypher Query string.
public override string Compile();
Returns
System.String
Cypher Query string
<a name='CypherQueryBuilder.MatchQuery.CreateRelation(string,string,CypherQueryBuilder.Node,CypherQueryBuilder.Node,bool,object)'></a>
MatchQuery.CreateRelation(string, string, Node, Node, bool, object) Method
Creates the relation.
public virtual CypherQueryBuilder.MatchCreationQuery CreateRelation(string alias, string label, CypherQueryBuilder.Node from, CypherQueryBuilder.Node to, bool toMerge=false, object? properties=null);
Parameters
<a name='CypherQueryBuilder.MatchQuery.CreateRelation(string,string,CypherQueryBuilder.Node,CypherQueryBuilder.Node,bool,object).alias'></a>
alias
System.String
The alias.
<a name='CypherQueryBuilder.MatchQuery.CreateRelation(string,string,CypherQueryBuilder.Node,CypherQueryBuilder.Node,bool,object).label'></a>
label
System.String
The label.
<a name='CypherQueryBuilder.MatchQuery.CreateRelation(string,string,CypherQueryBuilder.Node,CypherQueryBuilder.Node,bool,object).from'></a>
From.
<a name='CypherQueryBuilder.MatchQuery.CreateRelation(string,string,CypherQueryBuilder.Node,CypherQueryBuilder.Node,bool,object).to'></a>
To.
<a name='CypherQueryBuilder.MatchQuery.CreateRelation(string,string,CypherQueryBuilder.Node,CypherQueryBuilder.Node,bool,object).toMerge'></a>
toMerge
System.Boolean
if set to true
[to merge].
<a name='CypherQueryBuilder.MatchQuery.CreateRelation(string,string,CypherQueryBuilder.Node,CypherQueryBuilder.Node,bool,object).properties'></a>
properties
System.Object
The properties.
Returns
<a name='CypherQueryBuilder.MatchQuery.Limit(int)'></a>
MatchQuery.Limit(int) Method
Limits the specified limit.
public CypherQueryBuilder.MatchQuery Limit(int limit);
Parameters
<a name='CypherQueryBuilder.MatchQuery.Limit(int).limit'></a>
limit
System.Int32
The limit.
Returns
MatchQuery
MatchQuery
<a name='CypherQueryBuilder.MatchQuery.OrWhere(string)'></a>
MatchQuery.OrWhere(string) Method
Ors the where.
public CypherQueryBuilder.MatchQuery OrWhere(string clause);
Parameters
<a name='CypherQueryBuilder.MatchQuery.OrWhere(string).clause'></a>
clause
System.String
The clause.
Returns
<a name='CypherQueryBuilder.MatchQuery.Return(string[])'></a>
MatchQuery.Return(string[]) Method
Returns the specified returns.
public virtual CypherQueryBuilder.MatchQuery Return(params string[] returns);
Parameters
<a name='CypherQueryBuilder.MatchQuery.Return(string[]).returns'></a>
returns
System.String[]
The returns.
Returns
<a name='CypherQueryBuilder.MatchQuery.Return_T_(CypherQueryBuilder.Node_T_,System.Linq.Expressions.Expression_System.Func_T,object__)'></a>
MatchQuery.Return<T>(Node<T>, Expression<Func<T,object>>) Method
Returns the specified node.
public virtual CypherQueryBuilder.MatchQuery Return<T>(CypherQueryBuilder.Node<T> node, System.Linq.Expressions.Expression<System.Func<T,object>> f);
Type parameters
<a name='CypherQueryBuilder.MatchQuery.Return_T_(CypherQueryBuilder.Node_T_,System.Linq.Expressions.Expression_System.Func_T,object__).T'></a>
T
Parameters
<a name='CypherQueryBuilder.MatchQuery.Return_T_(CypherQueryBuilder.Node_T_,System.Linq.Expressions.Expression_System.Func_T,object__).node'></a>
node
CypherQueryBuilder.Node<T>
The node.
<a name='CypherQueryBuilder.MatchQuery.Return_T_(CypherQueryBuilder.Node_T_,System.Linq.Expressions.Expression_System.Func_T,object__).f'></a>
f
System.Linq.Expressions.Expression<System.Func<T,System.Object>>
The f.
Returns
<a name='CypherQueryBuilder.MatchQuery.Return_T_(string,System.Linq.Expressions.Expression_System.Func_T,object__)'></a>
MatchQuery.Return<T>(string, Expression<Func<T,object>>) Method
Returns the specified alias.
public virtual CypherQueryBuilder.MatchQuery Return<T>(string? alias, System.Linq.Expressions.Expression<System.Func<T,object>> f);
Type parameters
<a name='CypherQueryBuilder.MatchQuery.Return_T_(string,System.Linq.Expressions.Expression_System.Func_T,object__).T'></a>
T
Parameters
<a name='CypherQueryBuilder.MatchQuery.Return_T_(string,System.Linq.Expressions.Expression_System.Func_T,object__).alias'></a>
alias
System.String
The alias.
<a name='CypherQueryBuilder.MatchQuery.Return_T_(string,System.Linq.Expressions.Expression_System.Func_T,object__).f'></a>
f
System.Linq.Expressions.Expression<System.Func<T,System.Object>>
The f.
Returns
<a name='CypherQueryBuilder.MatchQuery.Return_T_(System.Linq.Expressions.Expression_System.Func_T,object__)'></a>
MatchQuery.Return<T>(Expression<Func<T,object>>) Method
Returns the specified f.
public CypherQueryBuilder.MatchQuery Return<T>(System.Linq.Expressions.Expression<System.Func<T,object>>? f=null);
Type parameters
<a name='CypherQueryBuilder.MatchQuery.Return_T_(System.Linq.Expressions.Expression_System.Func_T,object__).T'></a>
T
Parameters
<a name='CypherQueryBuilder.MatchQuery.Return_T_(System.Linq.Expressions.Expression_System.Func_T,object__).f'></a>
f
System.Linq.Expressions.Expression<System.Func<T,System.Object>>
The f.
Returns
<a name='CypherQueryBuilder.MatchQuery.Skip(int)'></a>
MatchQuery.Skip(int) Method
Skips the specified skip.
public CypherQueryBuilder.MatchQuery Skip(int skip);
Parameters
<a name='CypherQueryBuilder.MatchQuery.Skip(int).skip'></a>
skip
System.Int32
The skip.
Returns
<a name='CypherQueryBuilder.MatchQuery.Union(CypherQueryBuilder.MatchQuery)'></a>
MatchQuery.Union(MatchQuery) Method
Unions the specified other.
public CypherQueryBuilder.UnionQuery Union(CypherQueryBuilder.MatchQuery other);
Parameters
<a name='CypherQueryBuilder.MatchQuery.Union(CypherQueryBuilder.MatchQuery).other'></a>
other
MatchQuery
The other.
Returns
<a name='CypherQueryBuilder.MatchQuery.Where(string)'></a>
MatchQuery.Where(string) Method
Wheres the specified clause.
public CypherQueryBuilder.MatchQuery Where(string clause);
Parameters
<a name='CypherQueryBuilder.MatchQuery.Where(string).clause'></a>
clause
System.String
The clause.
Returns
<a name='CypherQueryBuilder.NodeCreationQuery'></a>
NodeCreationQuery Class
public class NodeCreationQuery : CypherQueryBuilder.QueryBase
Inheritance System.Object 🡒 Utility.Disposable 🡒 QueryBase 🡒 NodeCreationQuery
Methods
<a name='CypherQueryBuilder.NodeCreationQuery.Compile()'></a>
NodeCreationQuery.Compile() Method
Compiles this instance to Cypher Query string.
public string Compile();
Returns
System.String
Cypher Query string
<a name='CypherQueryBuilder.Query'></a>
Query Class
Query
- The main entry point to build cypher query for create, merge or match
public static class Query
Inheritance System.Object 🡒 Query
Methods
<a name='CypherQueryBuilder.Query.Create(bool,CypherQueryBuilder.Node,CypherQueryBuilder.Node[])'></a>
Query.Create(bool, Node, Node[]) Method
Creates the specified to merge.
private static CypherQueryBuilder.NodeCreationQuery Create(bool toMerge, CypherQueryBuilder.Node node, params CypherQueryBuilder.Node[] otherNodes);
Parameters
<a name='CypherQueryBuilder.Query.Create(bool,CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).toMerge'></a>
toMerge
System.Boolean
if set to true
[to merge].
<a name='CypherQueryBuilder.Query.Create(bool,CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).node'></a>
The node.
<a name='CypherQueryBuilder.Query.Create(bool,CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).otherNodes'></a>
otherNodes
CypherQueryBuilder.Node[]
The other nodes.
Returns
<a name='CypherQueryBuilder.Query.Create(CypherQueryBuilder.Node,CypherQueryBuilder.Node[])'></a>
Query.Create(Node, Node[]) Method
Creates the specified node.
public static CypherQueryBuilder.NodeCreationQuery Create(CypherQueryBuilder.Node node, params CypherQueryBuilder.Node[] otherNodes);
Parameters
<a name='CypherQueryBuilder.Query.Create(CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).node'></a>
Node to Create
<a name='CypherQueryBuilder.Query.Create(CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).otherNodes'></a>
otherNodes
CypherQueryBuilder.Node[]
Other nodes to match in case multiple nodes to be created.
Returns
NodeCreationQuery
NodeCreationQuery
Example
Example to build create query.
var movie = new Movie() { ReleaseYear = 2010, Title = "Gambler" };
var q = Query.Create(
Node<Movie>.Create(movie)
.WithRelation(Node<Person>.Create(new Person {Age = 30, FullName = "Ray" }), "DIRECTED_BY"))
.Return<Movie>(p => new { p.Title, p.ReleaseYear }).Return<Person>(p => new { p.FullName});
var str = q.Compile();
<a name='CypherQueryBuilder.Query.Match(CypherQueryBuilder.Node,CypherQueryBuilder.Node[])'></a>
Query.Match(Node, Node[]) Method
Matches the specified node.
public static CypherQueryBuilder.MatchQuery Match(CypherQueryBuilder.Node node, params CypherQueryBuilder.Node[] otherNodes);
Parameters
<a name='CypherQueryBuilder.Query.Match(CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).node'></a>
Node to Match
<a name='CypherQueryBuilder.Query.Match(CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).otherNodes'></a>
otherNodes
CypherQueryBuilder.Node[]
Other nodes to match in case multiple nodes to be matched
Returns
MatchQuery
MatchQuery
Example
var q = Query.Match(n).Return("n", "r", "m");
<a name='CypherQueryBuilder.Query.Merge(CypherQueryBuilder.Node,CypherQueryBuilder.Node[])'></a>
Query.Merge(Node, Node[]) Method
Merges the specified node.
public static CypherQueryBuilder.NodeCreationQuery Merge(CypherQueryBuilder.Node node, params CypherQueryBuilder.Node[] otherNodes);
Parameters
<a name='CypherQueryBuilder.Query.Merge(CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).node'></a>
The node.
<a name='CypherQueryBuilder.Query.Merge(CypherQueryBuilder.Node,CypherQueryBuilder.Node[]).otherNodes'></a>
otherNodes
CypherQueryBuilder.Node[]
The other nodes in case multiple nodes to be merged.
Returns
NodeCreationQuery
NodeCreationQuery
Example
Example to build merge query.
var movie = new Movie() { ReleaseYear = 2010, Title = "Gambler" };
var q = Query.Merge(
Node<Movie>.Create(movie)
.WithRelation(Node<Person>.Create(new Person {Age = 30, FullName = "Ray" }), "DIRECTED_BY"))
.Return<Movie>(p => new { p.Title, p.ReleaseYear }).Return<Person>(p => new { p.FullName});
var str = q.Compile();
<a name='CypherQueryBuilder.QueryBase'></a>
QueryBase Class
public class QueryBase : Utility.Disposable
Inheritance System.Object 🡒 Utility.Disposable 🡒 QueryBase
Derived
↳ MatchQuery
↳ NodeCreationQuery
Methods
<a name='CypherQueryBuilder.QueryBase.Compile()'></a>
QueryBase.Compile() Method
Compiles this instance to Cypher Query string.
public virtual string Compile();
Returns
System.String
Cypher Query string
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. |
-
net8.0
- Currying (>= 1.0.4)
- ExpressionTreeToStringWithCypher (>= 1.0.1)
- Microsoft.IdentityModel.Tokens (>= 7.6.2)
- Utility.Disposable (>= 1.1.1)
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 | |
---|---|---|---|
1.7.4 | 91 | 11/11/2024 | |
1.7.3 | 81 | 11/5/2024 | |
1.7.2 | 71 | 10/29/2024 | |
1.7.1 | 109 | 9/25/2024 | |
1.7.0 | 93 | 9/24/2024 | |
1.6.2 | 107 | 9/11/2024 | |
1.6.1 | 82 | 8/2/2024 | |
1.6.0 | 60 | 7/31/2024 | |
1.5.2 | 72 | 7/26/2024 | |
1.5.1 | 101 | 7/24/2024 | |
1.5.0 | 98 | 7/15/2024 | |
1.4.2 | 88 | 7/12/2024 | |
1.4.1 | 92 | 7/12/2024 | |
1.4.0 | 80 | 7/12/2024 | |
1.3.2 | 111 | 7/9/2024 | |
1.3.1 | 97 | 7/5/2024 | |
1.3.0 | 98 | 7/5/2024 | |
1.2.0 | 108 | 7/2/2024 | |
1.1.1 | 106 | 7/1/2024 | |
1.1.0 | 107 | 6/29/2024 | |
1.0.0 | 128 | 6/25/2024 |