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 r2dbc-postgres.
On Monday, March 22, 2021 at 1:26:23 PM UTC+1 [email protected] wrote: > 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 Persson <[email protected]> > wrote: > >> 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 you are subscribed to the Google Groups >> "jOOQ User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jooq-user/8405b074-cb9e-4be5-9f2d-f8bc74d2fde8n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jooq-user/8405b074-cb9e-4be5-9f2d-f8bc74d2fde8n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/fed9b2bc-6dfd-48fc-bb32-1408021f2b73n%40googlegroups.com.
