JSqlParser
JSqlParser copied to clipboard
Postgres "->" not support "?"
Describe the bug A clear and concise description of what the bug is.
String sql = "SELECT ti.*\n" + " FROM ticket_info ti\n" + " WHERE ti.tenant_id = ?\n" + " AND (ti.form_value -> '23s'):: jsonb\n" + " ?| (array[?,?,?,?,?])"; Select selectStatement = (Select) CCJSqlParserUtil.parse(sql); System.out.println(selectStatement.toString());
if i do this, it's ok;
if change ti.form_value -> '23s' to ti.form_value -> ?, it's throw a exception.

Expected behavior A clear and concise description of what you expected to happen.
System
- Database you are using postgres 9.6
- Java Version 1.8
- JSqlParser version 4.2
That's right. At the moment those JSonExpressions only support character literals and longs. PRs are welcome.
Works with JSQLParser 4.6, closed.