I'm using jsonb in my table and have a where condition like WHERE NOT my_json->'duration' = 'null'. Only when it gets sent to postgres via 'query_opt' postgres receives WHERE NOT my_json->duration = 'null' which is an invalid query and returns an error. Is there a way I can get tokio_postgres to not interpolate this string and break the query?
This is also for a quick-and-dirty dev tool that will never see prod so I'm fine with something a bit hacky/unsafe.
I'm using jsonb in my table and have a where condition like
WHERE NOT my_json->'duration' = 'null'
. Only when it gets sent to postgres via 'query_opt' postgres receivesWHERE NOT my_json->duration = 'null'
which is an invalid query and returns an error. Is there a way I can get tokio_postgres to not interpolate this string and break the query?This is also for a quick-and-dirty dev tool that will never see prod so I'm fine with something a bit hacky/unsafe.