2 Commits

Author SHA1 Message Date
525c64e678 removed toLower 2025-08-10 12:54:29 +05:30
5f0fdadb8b undo, strings.ToLower 2025-08-10 12:24:26 +05:30

6
pgm.go
View File

@@ -104,12 +104,10 @@ func (f Field) Eq(val any) Conditioner {
return &Cond{Field: col, Val: val, op: " = $", len: len(col) + 5}
}
// EqualFold will use LOWER(column_name) = val for comparision
//
// strings.ToLower(val) will pefromed on the provide val
// EqualFold will use LOWER(column_name) = LOWER(val) for comparision
func (f Field) EqFold(val string) Conditioner {
col := f.String()
return &Cond{Field: "LOWER(" + col + ")", Val: strings.ToLower(val), op: " = LOWER($", action: CondActionNeedToClose, len: len(col) + 5}
return &Cond{Field: "LOWER(" + col + ")", Val: val, op: " = LOWER($", action: CondActionNeedToClose, len: len(col) + 5}
}
func (f Field) NEq(val any) Conditioner {