dal/pkg/filters/Lt.go

19 lines
339 B
Go
Raw Permalink Normal View History

package filters
type Lt struct {
Lt interface{} `json:"$lt"`
}
2024-08-08 17:26:29 +00:00
func (f Lt) FromJSON(data interface{}) IFilter {
return FromJson[Lt](data)
}
func (f Lt) ToSQLPart(ctx Dialect) (string, Values) {
if f.Lt == nil {
return "", nil
}
name := ctx.GetFieldName()
value := ctx.NormalizeValue(f.Lt)
return FmtCompare("<", name, value)
}