An update on R2DBC matters. This was really much simpler than I thought.
The DSLContext.parsingConnectionFactory() is now implemented for jOOQ
3.15.0-SNAPSHOT for all jOOQ editions, including the jOOQ Open Source
Edition. It works just like the DSLContext.parsingConnection(), and profits
from t
This really doesn't seem too hard! Here's a quick draft leveraging the
translation capabilities from the jOOQ 3.15.0-SNAPSHOT Professional Edition
to translate Teradata QUALIFY to PostgreSQL (I marked the interesting stuff
in yellow):
package org.jooq.r2dbc;
import static org.jooq.impl.DSL.val;
Here we go. As I said, I think we should offer this out of the box, and
integration test it: https://github.com/jOOQ/jOOQ/issues/11700. It's a
rather low hanging fruit, much lower than executing jOOQ queries on R2DBC.
I'll look into this later this week.
On Mon, Mar 22, 2021 at 9:08 PM Lukas Eder
Search "(?:
> It almost gets me all the way :)
>
> The input sql has named parameters, as in "SELECT c1, c2 FROM foo WHERE
> bar = :baz OR quz = :qux". I would like to have that rendered as "SELECT
> c1, c2 FROM foo WHERE bar = $1 OR quz = $2". The intention is to use jooq
> as an sql parser and e
It almost gets me all the way :)
The input sql has named parameters, as in "SELECT c1, c2 FROM foo WHERE bar
= :baz OR quz = :qux". I would like to have that rendered as "SELECT c1, c2
FROM foo WHERE bar = $1 OR quz = $2". The intention is to use jooq as an
sql parser and executing it with r2db
Hi Magnus,
You can set Settings.paramType = ParamType.NAMED (this would produce :1, :2
if you don't actually provide any named parameters), and then
Settings.renderNamedParamPrefix = "$" to replace the default prefix ":" by
"$".
I hope this helps,
Lukas
On Sat, Mar 20, 2021 at 5:01 PM Magnus Per
I'm using the jooq sql parser with the intention of outputting sql and bind
values. Unfortunatly the sql coming out of jooq has either named
":param" or indexed by "?". How would I go about having jooq output
sequenced index markers such as "$1", "$2" etc?
--
You received this message because