select, go back to Ash.Query module for more information.
Ensure that only the specified attributes are present in the results.
The first call to
select/2 will replace the default behavior of selecting
all attributes. Subsequent calls to
select/2 will combine the provided
fields unless the
replace? option is provided with a value of
If a field has been deselected, selecting it again will override that (because a single list of fields is tracked for selection)
Primary key attributes are always selected and cannot be deselected.
When attempting to load a relationship (or manage it with
if the source field is not selected on the query/provided data an error will be produced. If loading
a relationship with a query, an error is produced if the query does not select the destination field
of the relationship.
ensure_selected/2 if you simply wish to make sure a field has been selected, without deselecting any other fields.