birch-wood / tanK

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

Refactor query class structure #25

Closed martinemdal closed 4 years ago

martinemdal commented 4 years ago

In an effort to mirror the domain of Cypher the structure of query and graph were rewritten. Now a query is built from clauses and each clause will implement apropriate interfaces that contain the functions relevant to the scope of a given clause. The most notable difference is in the use of the match and create functions as the scope in their lambdas is now specific to that clause and not shared across all clauses:

query {
  match {
  // `this` is a MatchClause in this block
  }
}
kollstrom commented 4 years ago

Autoformat all of the new lines and I think we're good