galley-0.83.0: Conversations
Safe HaskellSafe-Inferred
LanguageGHC2021

Galley.Cassandra.Queries

Synopsis

Documentation

selectTeamMembers :: PrepQuery R (Identity TeamId) (UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus) Source #

This query fetches **all** members of a team, it should always be paginated

updatePermissions :: PrepQuery W (Permissions, TeamId, UserId) () Source #

This is not an upsert, but we can't add `IF EXISTS` here, or cassandra will yell `Invalid "Batch with conditions cannot span multiple tables"` at us. So we make sure in the application logic to only call this if the user exists (in the handler, not entirely race-condition-proof, unfortunately).