Skip to content

Postgres "->" not support "?" #1434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rarechit opened this issue Nov 30, 2021 · 2 comments
Closed

Postgres "->" not support "?" #1434

rarechit opened this issue Nov 30, 2021 · 2 comments

Comments

@rarechit
Copy link

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.
image

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
@wumpz
Copy link
Member

wumpz commented Dec 12, 2021

That's right. At the moment those JSonExpressions only support character literals and longs. PRs are welcome.

@manticore-projects
Copy link
Contributor

Works with JSQLParser 4.6, closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants