mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add "projects list" command to the CLI (#333)
This adds a WorkspaceOwnerCount parameter returned from the projects API. It's helpful to display the amount of usage a specific project has.
This commit is contained in:
@@ -278,6 +278,18 @@ WHERE
|
||||
owner_id = $1
|
||||
AND project_id = $2;
|
||||
|
||||
-- name: GetWorkspaceOwnerCountsByProjectIDs :many
|
||||
SELECT
|
||||
project_id,
|
||||
COUNT(DISTINCT owner_id)
|
||||
FROM
|
||||
workspace
|
||||
WHERE
|
||||
project_id = ANY(@ids :: uuid [ ])
|
||||
GROUP BY
|
||||
project_id,
|
||||
owner_id;
|
||||
|
||||
-- name: GetWorkspaceHistoryByID :one
|
||||
SELECT
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user