Yeah I was going to put in "/* ... */" support but it ended up making the
SQL nastier than just forcing you to put the placeholder at the end of the
line
plus I don't think all databases support "/* ... */". At some point I will
probably add it though.
Most of the time for SELECT statements I don't need that many placeholders
replaced (1-3 on average).
Where it can get nasty is on INSERT and UPDATE statements but for those
statements you can use the auto ORM JPA SQL generation.
To tell you the truth I actually like the tedium of new lines and having to
format your SQL.
I'm sure you have written INSERT statements where its difficult to match up
which value goes to which column.
For example this is tedious for short INSERTs:
INSERT INTO test_bean
(string_prop, long_prop, timets)
VALUES (
'HELLO' -- {stringProp}
, 3000 -- {longProp}
, now() -- {timeTS}
)
But for really long inserts with many columns its actually convenient.
On Saturday, November 3, 2012 4:57:09 AM UTC-4, Lukas Eder wrote:
>
> Hello Adam,
>
> > Hey Lukas since your starting work on jOOQ 3.0 I thought you might want
> to
> > look at my project I finally released today.
>
> Yes, I've seen your first release. Congratulations to that! I'll
> certainly have a look and steal 1-2 ideas ;-)
>
> > Obviously its not as mature or as advance as jOOQ.
> > It also has a different goal of jOOQ of which is to be an ORM for
> immutable
> > objects.
>
> Immutability can be a great feature if you design your application
> around that. I'll be curious how that is received. Eventually, I'll
> write a short promotional article about JIRM on my blog, which is
> republished on DZone
>
> > I have added many feature I have always wanted like SQL Placeholder
> > Templates that you can copy and paste into any SQL Query tool and then
> copy
> > them back:
> > https://github.com/agentgt/jirm/tree/master/jirm-core
>
> Interesting. I wonder how SQL templating of that sort will work, once
> SQL statements get more complex. Do you support /* ... */ style
> comments, too? I've recently had a look at Stephen Colebourne's
> (JodaTime) SQL templating solution, where he wrote a little external
> DSL for precisely that purpose:
> http://blog.joda.org/2012/10/elsql-librarydsl-to-manage-sql.html
>
> I can see that those templating engines, such as myBatis, ElSql, JIRM
> work well in an entire problem domain...
>
> > Looking forward to jOOQ 3.0!
>
> Me too! :-)
> Thanks for your feedback and for the promotion of JIRM. If you have
> any other good ideas that you put in JIRM and that you want to
> discuss, feel free to mention them on this group as well
>
> Cheers
> Lukas
>