dal/pkg/filters/Gt.go

19 lines
339 B
Go
Raw Permalink Normal View History

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