This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Description
If field querying is used with numbers and operations lt or gt the comparison is done alphabetically.
For example: col1 gt 12 in a table containing rows with col1 from 1 to 14 will return result with col1 from 2 to 9, 13 and 14 instead of just 13 and 14.
The problematic code seems to be here:
|
clause := fmt.Sprintf("%s.%s::text %s %s", baseTableName, option.LeftOp, sqlOperation, rightOpBindVar) |
and more specifically the
::text.