code_corps v0.0.1 CodeCorps.Messages.ConversationQuery View Source
Holds helpers to query CodeCorps.Conversation records using a map of params.
Link to this section Summary
Functions
Filters CodeCorps.Conversation record queries to return only those
considered to be active
Narrows down a CodeCorps.Conversation query by project_id of the parent
CodeCorps.Message, if specified in a params map
Filters CodeCorps.Conversation record queries by their status
Narrows down a CodeCorps.Conversation query by user_id, if specified in a
params map
Link to this section Functions
active_filter(Ecto.Queryable.t(), map()) :: Ecto.Queryable.t()
Filters CodeCorps.Conversation record queries to return only those
considered to be active.
Active conversations belong either:
- to a
CodeCorps.Messageinitiated by user - to a
CodeCorps.Messageinitiated by an admin, with at least a single conversation part
project_filter(Ecto.Queryable.t(), map()) :: Ecto.Queryable.t()
Narrows down a CodeCorps.Conversation query by project_id of the parent
CodeCorps.Message, if specified in a params map
status_filter(Ecto.Queryable.t(), map()) :: Ecto.Queryable.t()
Filters CodeCorps.Conversation record queries by their status.
user_filter(Ecto.Queryable.t(), map()) :: Ecto.Queryable.t()
Narrows down a CodeCorps.Conversation query by user_id, if specified in a
params map