-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(filter): Implement wild card searching for issue #95 #131
Conversation
michalkrzyz
commented
Aug 8, 2024
- Add search filter for wildcard-like searching
- Add compose makefile targets
5fbb255
to
d9054eb
Compare
- Add search filter for wildcard-like searching - Add compose makefile targets Signed-off-by: Michal Krzyz <[email protected]>
97865d0
to
8ed948c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good to me! I just got one question where I do understand the change.
for i := 0; i < count; i++ { | ||
params = append(params, item) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why we need to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used because Wild Card query has multiple logical statements with the same parameter, here is pseudo code we are using:
'WHERE ....some previous conditions... AND (primName LIKE searchParam OR secName LIKE searchParam) AND ...
search param is the same for every single element from search list of filters. It is passed currently through two SQL Query parameters passed by question marks per search element. In all other filters, we have only single question marks used.
We could add extra SET Sql keyword to set every parameter to some value but it will complicate the design a bit, but I am open for discussion.
Meanwhile I will try to find better name for this function I have added to database.go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh thanks for explaining
@MR2011 please take second look! Looks good to me! |