When inserting values into my Postgres database, I want to make sure if the value does not exist to then insert NULL instead.
→ I’m using the execute Query function, not INSERT because it will not allow me to cast types when inserting.
I’ve tried various different syntaxes, but either get a literal null, [empty] or undefined in my database even though I enabled replace empty strings with NULL (which it doesn’t do).
Indeed the JSONB values will result in the currect null value, but the issue lies with the strings: group_ride_id, product_name, vehicle_qr_code.
When using NULL or null it will insert a literal, when using ‘’ it will result in empty.