@neo4j/cypher-builder
Advanced tools
Changelog
1.7.3
#236 34552dc
Thanks @angrykoala! - Support for chained .yield
:
const customProcedure = new Cypher.Procedure("customProcedure", []).yield("result1").yield(["result2", "aliased"]);
is equivalent to:
const customProcedure = new Cypher.Procedure("customProcedure", []).yield("result1", ["result2", "aliased"]);
and results in the Cypher:
CALL customProcedure() YIELD result1, result2 AS aliased
Changelog
1.7.2
#230 f37cc99
Thanks @angrykoala! - Support for passing undefined
to .where
:
const n = new Cypher.Node();
new Cypher.Match(n).where(undefined).return(n);
This will generate the following Cypher:
MATCH(n)
RETURN n
Note that the WHERE
clause is omitted if the predicate is undefined
Changelog
1.7.1
84b1534
Thanks @angrykoala! - Support for new Call().innerWith("*")
to generate WITH *
inside a CALL
subqueryChangelog
1.7.0
#218 81dc823
Thanks @angrykoala! - Add support for CDC procedures:
cdc.current
cdc.earliest
cdc.query
#224 c872abd
Thanks @angrykoala! - Implement functions from Cypher 5.13:
valueType
char_length
character_length
cae1828
Thanks @angrykoala! - Removes duplication between RawCypher (deprecated) and RawChangelog
1.6.0
#211 2e76445
Thanks @angrykoala! - Add chained clauses in unwind:
Unwind.return
Unwind.remove
Unwind.set
fa3d246
Thanks @angrykoala! - Add chained methods in Merge:
Merge.remove
Merge.with
#213 64edcdd
Thanks @angrykoala! - Add methods for chained Merge:
Match.merge
Create.merge
Call.merge
Foreach.merge
Merge.merge
Unwind.merge
With.merge
#206 1ef6244
Thanks @angrykoala! - Add methods for chained match clauses:
With.match
With.optionalMatch
Unwind.match
Unwind.optionalMatch
Call.match
Call.optionalMatch
#204 8227ade
Thanks @angrykoala! - Add chained clauses in CALL clause:
Call.remove
Call.set
Call.delete
Call.detachDelete
#212 33ceb71
Thanks @angrykoala! - Add methods for chained Create method:
Match.create
Call.create
Foreach.create
Merge.create
Unwind.create
With.create
#200 d582e1a
Thanks @angrykoala! - Add support nested match clauses #90:
Match.match()
Match.optionalMatch()
#210 9388048
Thanks @angrykoala! - Add chained subclauses for foreach:
Foreach.return
Foreach.remove
Foreach.set
Foreach.delete
Foreach.detachDelete
#201 70c60b1
Thanks @angrykoala! - Support for chained unwind:
Unwind.unwind
Match.unwind
With.unwind
#203 d7d0d2f
Thanks @angrykoala! - Add support for chained methods on Create clause:
Create.remove
Create.delete
Create.detachDelete
Create.with
Create.create
Changelog
1.5.2
#194 0c40f04
Thanks @angrykoala! - Refactors mixins.
Due to this, multiple top-level clauses nested in the same clause will explicitly fail, instead of silent failing:
The following is not supported;
const match = new Cypher.Match();
match.with();
match.return();
In favor of the following:
const match = new Cypher.Match();
match.with().return();
#195 6b24fdd
Thanks @angrykoala! - Support for expressions on Pattern properties:
const pattern = new Cypher.Pattern(node).withProperties({
name: Cypher.plus(new Cypher.Literal("The "), new Cypher.Literal("Matrix")),
});
Results in:
(this0: {name: "The " + "Matrix"})
#199 58dfee6
Thanks @angrykoala! - Fix RawCypher types
#198 bfb1c97
Thanks @angrykoala! - Deprecates using With.with
when nested with already exists in favour of addColumn
:
const withQuery = new Cypher.With(node);
withQuery.with(node2);
withQuery.with("*");
Instead, it should be:
const withQuery = new Cypher.With(node);
const nestedWith = withQuery.with(node2);
nestedWith.addColumn("*");
Changelog
1.5.1
75e083e
Thanks @angrykoala! - Deprecates Cypher.RawCypher
in favor of Cypher.Raw
Changelog
1.4.0
#127 574f5f6
Thanks @angrykoala! - Deprecates Cypher.utils.compileCypher
and .getCypher
in favor of env.compile
:
Previously:
new Cypher.RawCypher((env) => {
const myVar = new Cypher.Variable();
return myVar.getCypher(env);
});
Or
new Cypher.RawCypher((env) => {
const myVar = new Cypher.Variable();
return Cypher.utils.compileCypher(myVar, env);
});
Now:
new Cypher.RawCypher((env) => {
const myVar = new Cypher.Variable();
return env.compile(myVar);
});
480d3b4
Thanks @angrykoala! - Change mixins class hierarchy, removing intermediate "ClauseMixin"Changelog
1.3.0
#106 7474e62
Thanks @angrykoala! - Add instant temporal functions:
As well as the related nested functions:
#100 73d9cba
Thanks @angrykoala! - Add duration functions:
#110 f405df2
Thanks @angrykoala! - Fix RegExp with super-linear runtime
#107 ed13cb8
Thanks @angrykoala! - Add sugar syntax Cypher.true
and Cypher.false
for new Cypher.Literal(true)
and new Cypher.Literal(false)