Replies: 1 comment
-
In my reading of the docs, you would do: -- name: GetThings :many
SELECT * FROM things
WHERE field = $1
ORDER BY created_at desc
LIMIT $2 OFFSET $3; The generated function looks like this: type GetThingsParams struct {
Field string
Limit int32
Offset int32
}
type GetThingsRow struct {
ID int32
Field string
...
}
func (q *Queries) GetThings(ctx context.Context, arg GetThingsParams) ([]GetThingRow, error) {
...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, All!
Is there a solution to paginate :many context?
Thanx a lot!
Beta Was this translation helpful? Give feedback.
All reactions