group_membership
Current membership keyed by group_name
What you'll learn
You're writing SQL that reads group_membership and need its columns, what each holds, and the DDL as the spec states it.
- every column and its type
- what the object holds and who writes it
- the DDL as the spec states it
A view. Current membership keyed by group_name — the view to query for membership.
Columns
group_name, group_id, identity_id.
Definition
From spec/ledger.sql, which is the machine-checkable form of SPEC.md §3:
CREATE VIEW group_membership AS
SELECT g.name AS group_name, m.group_id, m.identity_id
FROM group_members m
JOIN groups g ON g.id = m.group_id;