t9t / jooq-postgresql-json

jOOQ support for PostgreSQL json & jsonb
Apache License 2.0
55 stars 10 forks source link

Feature request: JSON string placeholder #20

Open whisper-bye opened 2 years ago

whisper-bye commented 2 years ago

From this

JsonbDSL.field("{\"id\": \"1337\"}")

To this

JsonbDSL.field("{\"id\":{0}}", "1337")
t9t commented 2 years ago

Thanks for the suggestion! Unfortunately maintaining this project is a bit on the backburner for me because I don't use it myself anymore (I have no projects where it's applicable).

Having said that, with this particular feature I also have some worries as a bad implementation could lead to the potential for SQL injection. If possible, existing JOOQ features should be used for the string placeholder functionality.

I might have some time to look into it this week but I can't promise that unfortunately. If you feel up to creating a merge request that would be greatly appreciated.