birch-wood / tanK

A Kotlin DSL wrapper for Cypher
Apache License 2.0
0 stars 0 forks source link

Support for CREATE keyword #6

Closed kollstrom closed 4 years ago

kollstrom commented 4 years ago

Create DSL support for CREATE keyword:

CREATE (p:Person)-[:LIKES]->(t:Technology)
kollstrom commented 4 years ago

@martinemdal do we want this type of syntax:

Graph().create {
      node("n")
      node("m")
    }

and make that output CREATE (n), (m)?

Right now you can just do

Graph().create {
      node("n")
    }.create {
      node("m")
}

which will output

CREATE (n)
CREATE (m)

but isn't the first example more Cypher-esque?

kollstrom commented 4 years ago

Also. How do we want to support setting multiple labels on the same node?