Bauble / bauble.classic

this is how Bauble and Ghini both started
GNU General Public License v2.0
10 stars 34 forks source link

Query builder inserts invalid operators #160

Closed sehrgut closed 8 years ago

sehrgut commented 9 years ago

The Query Builder displays "is" and "is not" operators. According to this post, these operators are not supported in current query syntax.

mfrasca commented 9 years ago

I am not so sure now what really happens there. the list of the binary operators that get parsed is not the same as the binary operators that are implemented (and I should define this only once at the same spot). however, 'is' is in both lists, so I think I need add some more logging in order to see what goes on in practice. I still need verify the query builder, which cannot be easily tied to the search parser definition.

mfrasca commented 9 years ago

possibly need to study this Q&A on stackoverflow

mfrasca commented 9 years ago

the QueryBuilder is in the same source file, and it again defines again the list of binary operators.

sehrgut commented 9 years ago

It's possible that is isn't even a necessary operator. I would expect it to operate on a record-identity basis, rather than on a value-comparison basis. Since queries don't permit joins or subqueries (i.e accession where genus is accession(id=1234).genus to find all congeners of a given accession), just for a contrived example), "None" is the only object I could see a real use in comparing with is.

mfrasca commented 9 years ago

apart from the is vs. = discussion, I like the idea accession where species.genus is accession(id=1234).species.genus in this particular case you could select the genus and you would be able to expand the species under the genus and the accessions under the species. but it would be different than directly having the list of accessions under the genus.