On Thursday, September 20, 2012 4:57:42 PM UTC-4, Ben Hood wrote: > > > FWIW another nice way I've seen this done is the way myBatis uses thread > locals to avoid the dot notation when constructing SQL programmtically. > However this is just syntactical sugar as it doesn't actually type check > (*) your tables or their columns in the way JOOQ does - not to mention all > of the other benefits JOOQ gives you. > > HTH, > > Ben > > (*) for some value of type safety >
I Actually ported the myBatis SqlBuilder to NOT use thread locals: http://adamgent.com/post/30974973820/mybatis-sqlbuilder-rewritten Clinton from myBatis I think will incorporate that style in future releases. As for type checking its nice... but its sort of lie. Its not guaranteed syntactically correct unless it runs against the database particularly if the query is dynamically constructed. This was the impetus for Play 2.0 to choose Anorm (which although I agree with the idea I think the Play 2.0 team just lost some steam and kind of pooped out Anorm). However the table constant/field generation... thats pretty awesome and does add some nice safety.
