Skip to content
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

cmp: EqLit may break the query #199

Open
mmatczuk opened this issue Oct 7, 2021 · 0 comments
Open

cmp: EqLit may break the query #199

mmatczuk opened this issue Oct 7, 2021 · 0 comments

Comments

@mmatczuk
Copy link
Contributor

mmatczuk commented Oct 7, 2021

There is a query builder code using the table model table.SchedRun.UpdateBuilder("status").If(qb.EqLit("status", "RUNNING")), it generates

AAA [query statement="UPDATE scheduler_task_run SET status=? WHERE cluster_id=? AND type=? AND task_id=? AND id=? IF status=RUNNING " values=[FOO 30f3ac8b-4f29-4beb-8b1d-d40020586a96 mock fe0e6697-ad19-47af-a359-8c2f8d7a4e0d eea3301d-275b-11ec-bf87-c85b76f42222] consistency=QUORUM]

Which fails with no viable alternative at input.
As it turns out the issue is the lack of quotes i.e. IF status='RUNNING'.
The workaround is by using EqNamed instead.

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

No branches or pull requests

1 participant