Currently, when we transform query (e.g. by adding limit) we in fact just concatenate Fragments which is very unsafe. Instead I think we should create a SELECT AST (later for INSERT and UDPATE as well) and when transforming method is called - we can just patch the bits of this AST. The AST could live in compile-time only, thus it doesn't even have to be completely type-safe.
Select(All, From("persons"), Where(Gte("age", 18)))
Currently, when we transform query (e.g. by adding
limit) we in fact just concatenateFragmentswhich is very unsafe. Instead I think we should create aSELECTAST (later forINSERTandUDPATEas well) and when transforming method is called - we can just patch the bits of this AST. The AST could live in compile-time only, thus it doesn't even have to be completely type-safe.