42ab71e964
Signed-off-by: Anton Nesterov <anton@demiurg.io>
19 lines
339 B
Go
19 lines
339 B
Go
package filters
|
|
|
|
type Lt struct {
|
|
Lt interface{} `json:"$lt"`
|
|
}
|
|
|
|
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)
|
|
}
|