gogf / gf

GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
https://goframe.org
MIT License
11.49k stars 1.57k forks source link

database/sql:how to avoid question mark as placeholder using postgres ? #3744

Open rw202307 opened 3 weeks ago

rw202307 commented 3 weeks ago

What do you want to ask?

I want to take question mark(?) as operator in dealing jsonb in postgresql.(Question mark(?) can tell if the text string exist as a top-level key or array element within the JSON value.) However, while running program, one error occurs which says that, goframe2.7.2 take the question mark(?) as placeholder in my query. And this is my query: select col ? 'k1' from table1. ("col" is tables1's field with type jsonb in postgresql) My question is the title shown above. How to fix it??

yzy613 commented 3 weeks ago

cy