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 <lukas.e...@gmail.com> wrote: > Search "(?<!:):\\w+" > Replace "?" > 😉 > > But it's a great hint. We should supprt that OOTB. At the time, I was > trying to get the R2DBC folks not to diverge too far from JDBC and accept ? > as well, but I failed. > > Am Montag, 22. März 2021 schrieb Magnus Persson < > magnus.e.pers...@gmail.com>: > >> 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 lukas...@gmail.com 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 <magnus.e...@gmail.com> >>> 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 jooq-user+...@googlegroups.com. >>>> 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 jooq-user+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jooq-user/fed9b2bc-6dfd-48fc-bb32-1408021f2b73n%40googlegroups.com >> <https://groups.google.com/d/msgid/jooq-user/fed9b2bc-6dfd-48fc-bb32-1408021f2b73n%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 jooq-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO6oEoPy3b6jKq82Wr%2BDXdScBOJRZfheGOkGd6XMd9eymA%40mail.gmail.com.