Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support this type code ,i need to get page list #343

Open
jsonMark opened this issue Nov 16, 2022 · 3 comments
Open

support this type code ,i need to get page list #343

jsonMark opened this issue Nov 16, 2022 · 3 comments

Comments

@jsonMark
Copy link

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)
}
@abhijit-hota
Copy link

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

@jsonMark
Copy link
Author

.Where

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

@jsonMark
Copy link
Author

squirrel.Lt

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

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

this don not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants