aimozg
02/10/2017, 11:00 PMwhere
function would take an AST representation of the body --effectively it takes source code, and then transcompiles the AST for it.name == "bob"
into WHERE c.name == bob
, of the equivalent mongo thing (iirc something resembling {"where" { eq { field { "fname" }, "bob" }}
3 replies
Do you really need something more complex than infix functions and property references?
I'd say
val result: Iterable<Model> = dbConnection.where { Model::fName eq "bob" }
looks nice enough.