"景先生毕设|www.jxszl.com

C# CypherFluentQuery类代码示例

2023-12-29 17:48编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CypherFluentQuery类的典型用法代码示例。如果您正苦于以下问题:C#CypherFluentQuery类的具体用法?C#CypherFluentQuery怎么用?C#CypherFluentQuery使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:MultipleMatchClausesWithPairedWhereClauses publicvoidMultipleMatchClausesWithPairedWhereClauses() { //MATCH(n) //WHEREn.Foo={p0} //OPTIONALMATCH(n)--(x) //WHEREx.Bar={p1} //OPTIONALMATCH(x)--(a) //WHEREa.Baz={p2} //RETURNn,x varclient=Substitute.For(); varquery=newCypherFluentQuery(client) .Match("(n)") .Where((FooBarBazn)=>n.Foo=="abc") .OptionalMatch("(n)--(x)") .Where((FooBarBazx)=>x.Bar=="def") .OptionalMatch("(x)--(a)") .Where((FooBarBaza)=>a.Baz=="ghi") .Query; conststringexpected="MATCH(n) WHERE(n.Foo={p0}) OPTIONALMATCH(n)--(x) WHERE(x.Bar={p1}) OPTIONALMATCH(x)--(a) WHERE(a.Baz={p2})"; Assert.AreEqual(expected,query.QueryText); Assert.AreEqual(3,query.QueryParameters.Count()); }
原文链接:http://www.jxszl.com/biancheng/C/556833.html