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

Category parsing needs to be improved #103

Open
jperkin opened this issue Sep 2, 2020 · 0 comments
Open

Category parsing needs to be improved #103

jperkin opened this issue Sep 2, 2020 · 0 comments
Assignees

Comments

@jperkin
Copy link
Contributor

jperkin commented Sep 2, 2020

While working on refactoring the test suite, I observed some odd behaviour, which I tracked down to this query:

const char SHOW_ALL_CATEGORIES[] =
        "SELECT DISTINCT CATEGORIES FROM REMOTE_PKG WHERE "
        "CATEGORIES NOT LIKE '%% %%' ORDER BY CATEGORIES DESC;";

The problem is that this assumes that each category will have at least one package where it is the sole category. Instead each space-separated category should be parsed individually and then build the distinct list from there.

@jperkin jperkin self-assigned this Sep 2, 2020
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

1 participant