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

Use CONCAT for injecting LIKE parameters; #17346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ycliuhw
Copy link
Member

@ycliuhw ycliuhw commented May 7, 2024

Ideally, we can just do WHERE sruc.unit_id LIKE '$M.app_name/%', but sqlair ignores parameters in quotes, then SQLite complains:
invalid input parameter: argument of type "M" not used by query.
I opened an issue: canonical/sqlair#148, @Aflynn50 suggested we can use CONCAT as a workaround.
So I have this PR to fix the TODO.

There is no feature changes on this PR.
QA step: #17264

@ycliuhw ycliuhw requested a review from wallyworld May 7, 2024 05:25
@ycliuhw
Copy link
Member Author

ycliuhw commented May 7, 2024

/build

@hpidcock hpidcock added the 4.0 label May 7, 2024
@hpidcock
Copy link
Member

hpidcock commented May 7, 2024

Please extend the PR description and title to more accurately explain what this PR does and why it is changing something.

@ycliuhw ycliuhw changed the title Use CONCAT for LIKE parameters; Use CONCAT for injecting LIKE parameters; May 7, 2024
Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include QA steps?

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