diff --git a/crates/manager-core/src/group_collection_repo.rs b/crates/manager-core/src/group_collection_repo.rs index 14eb2c8..15eb86c 100644 --- a/crates/manager-core/src/group_collection_repo.rs +++ b/crates/manager-core/src/group_collection_repo.rs @@ -18,39 +18,6 @@ use sqlx::{PgPool, Postgres, Transaction}; use crate::config_resolver::CHAIN_LEVELS_CTE; -/// List the collection names of `kind` declared **directly at** `owner` (not -/// inherited), case-insensitively sorted. Used by `load_current` (apply diff) -/// and the read-only `collections ls`. -pub async fn list_for_owner( - pool: &PgPool, - owner: ScriptOwner, - kind: &str, -) -> Result, sqlx::Error> { - let rows: Vec<(String,)> = match owner { - ScriptOwner::App(a) => { - sqlx::query_as( - "SELECT name FROM group_collections \ - WHERE app_id = $1 AND kind = $2 ORDER BY LOWER(name)", - ) - .bind(a.into_inner()) - .bind(kind) - .fetch_all(pool) - .await? - } - ScriptOwner::Group(g) => { - sqlx::query_as( - "SELECT name FROM group_collections \ - WHERE group_id = $1 AND kind = $2 ORDER BY LOWER(name)", - ) - .bind(g.into_inner()) - .bind(kind) - .fetch_all(pool) - .await? - } - }; - Ok(rows.into_iter().map(|(n,)| n).collect()) -} - /// List **all** shared-collection declarations at `owner` as `(name, kind)` /// pairs, sorted. Used by the kind-aware apply diff and `collections ls`. pub async fn list_all_for_owner(