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

Whitespace is not trimmed from the end of query strings #1263

Merged
merged 7 commits into from Apr 13, 2021
Merged

Whitespace is not trimmed from the end of query strings #1263

merged 7 commits into from Apr 13, 2021

Conversation

ghost
Copy link

@ghost ghost commented Apr 2, 2021

I added a trim on the query strings so now it doesn't returns all the search if there are one or more space at the end of query.
Resolves #1260

@ghost
Copy link

ghost commented Apr 3, 2021

We should trim the query string on the backend as well so any scripts/external apps don't run into the same issue. Also, filtering out zero length clauses, which is presumably what happens when there are multiple sequential spaces in the middle of the query.

@ghost
Copy link
Author

ghost commented Apr 3, 2021

sure, I added a fix to trim it on backend too

pkg/sqlite/sql.go Outdated Show resolved Hide resolved
@WithoutPants WithoutPants added the bug Something isn't working label Apr 9, 2021
pkg/sqlite/sql.go Outdated Show resolved Hide resolved
pkg/sqlite/scene_test.go Outdated Show resolved Hide resolved
@ghost ghost requested a review from bnkai April 12, 2021 21:35
@WithoutPants WithoutPants merged commit 6a4421f into stashapp:develop Apr 13, 2021
@WithoutPants WithoutPants added this to the Version 0.7.0 milestone Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Whitespace is not trimmed from the end of query strings
2 participants