Skip to content

Commit

Permalink
Merge pull request #1132 from rdimitrov/order
Browse files Browse the repository at this point in the history
fix: get repositories in an ordered list
  • Loading branch information
rdimitrov committed Oct 6, 2023
2 parents c721d79 + d85e527 commit 06f70dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions database/query/repositories.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ SELECT * FROM repositories WHERE provider = $1 AND repo_id = $2 AND project_id =
-- name: ListRepositoriesByProjectID :many
SELECT * FROM repositories
WHERE provider = $1 AND project_id = $2
ORDER BY id
ORDER BY repo_name
LIMIT $3
OFFSET $4;

-- name: ListRegisteredRepositoriesByProjectIDAndProvider :many
SELECT * FROM repositories
WHERE provider = $1 AND project_id = $2 AND webhook_id IS NOT NULL
ORDER BY id;
ORDER BY repo_name;

-- name: ListRepositoriesByOwner :many
SELECT * FROM repositories
WHERE provider = $1 AND repo_owner = $2
ORDER BY id
ORDER BY repo_name
LIMIT $3
OFFSET $4;

-- name: ListAllRepositories :many
SELECT * FROM repositories WHERE provider = $1
ORDER BY id;
ORDER BY repo_name;


-- name: UpdateRepository :one
Expand Down
8 changes: 4 additions & 4 deletions internal/db/repositories.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 06f70dd

Please sign in to comment.