Hello,

> I'am using PostgreSQL.

I'll have to review this. Postgres can handle nulls well. It shouldn't
be necessary to inline null as a literal. I'll further investigate
this. It might actually be a bug:

https://sourceforge.net/apps/trac/jooq/ticket/1128

> There's any plan in future to have the ability of specifying if a
> parameter is rendered
> as a constant or not in the SQL string ?

In general, all values that you provide to jOOQ are bound as
variables. NULL is a very rare exception in some dialects that have
trouble binding null in some cases (mainly DB2 and Derby). I tend to
think that your case is a bug, not a feature.

You can always use Factory.field("?", type, bindings) to enforce bind
values. I don't see any need for additional methods in the API apart
from field(), val(), param() and literal()

> Another issue.
> I found that the "limit" and "offset" methods accept
> only a simple integer as parameter (not a Field) so it's impossible to
> set the limit as
> a named param.

You're right I hadn't thought about that, yet

> There's some way to get that, or It will be implemented some day ???

Currently, no. But it certainly makes sense. I'll implement it soon:
https://sourceforge.net/apps/trac/jooq/ticket/1129

Note that DB2, Ingres, SQL Server, Sybase ASE, Sybase SQL Anywhere
don't allow bind values in their LIMIT .. OFFSET equivalents (e.g. TOP
.. START AT, etc).

Cheers
Lukas

Reply via email to