squirrel icon indicating copy to clipboard operation
squirrel copied to clipboard

support this type code ,i need to get page list

Open jsonMark opened this issue 3 years ago • 3 comments

var where = map[string]interface{}{}

if data.StartTime > 0 {
	where["start_time > "] = data.IsDisplay
}

if data.EndTime > 0 {
            where["end_time < "] = data.EndTime
}

if len(where) > 0 {
	rowBuilder = rowBuilder.Where(where)
	countBuilder = countBuilder.Where(where)
}

jsonMark avatar Nov 16 '22 03:11 jsonMark

Why not use the given squirrel.Where and squirrel.Lt?

abhijit-hota avatar Nov 16 '22 13:11 abhijit-hota

.Where

V1.5.3 seem not squirrel.Where and squirrel.Lt function ,please show me full code

jsonMark avatar Nov 23 '22 02:11 jsonMark

squirrel.Lt

lt = squirrel.Lt{"title LIKE ?": fmt.Sprint("%", data.Title, "%")}

rowBuilder = rowBuilder.Where(lt)
countBuilder = countBuilder.Where(lt)

this don not work

jsonMark avatar Apr 12 '23 08:04 jsonMark