fire-eggs / Danbooru2021

Python scripts and tools for working with the Danbooru2022 data set. Note: this is a sqlite database and a viewer, not directly related to machine learning.
https://www.gwern.net/Danbooru2021
MIT License
42 stars 2 forks source link

Mis-handles a leading NOT clause #38

Open fire-eggs opened 3 years ago

fire-eggs commented 3 years ago

If the first clause in the multi-filter is marked NOT, the query ignores the NOT.

I.e. in getImagesForTags2 the first clause is always generated as:

(select tag_id from tags where name like ?)

but when NOT is checked for the first clause, it should be:

(select tag_id from tags where name not like ?)