diff --git a/pkg/repository/prisma/dbsqlc/batch.go b/pkg/repository/prisma/dbsqlc/batch.go index 1d98cfa43..2396deee9 100644 --- a/pkg/repository/prisma/dbsqlc/batch.go +++ b/pkg/repository/prisma/dbsqlc/batch.go @@ -28,7 +28,7 @@ WHERE AND qi."queue" = $2::text AND ( $3::bigint IS NULL OR - qi."id" > $3::bigint + qi."id" >= $3::bigint ) ORDER BY qi."id" ASC diff --git a/pkg/repository/prisma/dbsqlc/queue.sql b/pkg/repository/prisma/dbsqlc/queue.sql index 47db42f02..9d97f640b 100644 --- a/pkg/repository/prisma/dbsqlc/queue.sql +++ b/pkg/repository/prisma/dbsqlc/queue.sql @@ -54,7 +54,7 @@ WHERE AND qi."queue" = @queue::text AND ( sqlc.narg('gtId')::bigint IS NULL OR - qi."id" > sqlc.narg('gtId')::bigint + qi."id" >= sqlc.narg('gtId')::bigint ) ORDER BY qi."id" ASC