public ICypherQueryBuilder Create(string pattern, object node, string variable) { var cypherNode = Neo4jNodeTransformer.Transform(node, false, variable); var cypherPattern = String.Format(pattern, cypherNode); _query.AppendLine($"CREATE {cypherPattern}"); return(this); }
public ICypherQueryBuilder Match(string pattern, object[] nodes, string[] variables = null, bool isDefaultValueFilter = false) { if (variables != null && nodes.Length != variables.Length) { throw new GiftyException(ErrorType.IncorrectData, "Invalid number of params or nodes in Cypher's query"); } var cypherNodes = nodes.Select((n, index) => { return((variables != null) ? Neo4jNodeTransformer.Transform(n, isDefaultValueFilter, variables[index]) : Neo4jNodeTransformer.Transform(n, isDefaultValueFilter, null)); }).ToArray(); return(Match(pattern, cypherNodes)); }