Closed ghost closed 7 years ago
@metafex Before proceeding I would like to ask if the existing support for this via string(blob1) relop string(blob2)
is usable in your use case? Note: The code fragment is QL, not Go.
Theoretically it is usable, but it would need a lot of extra logic as the queries are generated and would need extra type-checking if a parameter is a blob or if the corresponding field is one.
Added a test for various blob sizes and added that strings and blobs can be compared.
It utilizes bytes.Compare from the standard library. The operators lt, gt, le and ge are only useful when comparing blobs of the same size, as they will return false otherwise. A use case for this is f.i. when storing IP addresses as blobs, to compare them and/or select ranges.