PersonStore.one 12, select: [:first_name, :last_name]
PersonStore.one 12, select: :first_name
Unlike preload, this will not be a direct passthrough to the Repo, instead this would parse the keyword list and always return the schema instance. If further functionality is needed then the developer can create a custom function on the store that uses the regular select option.
The purpose of the store is to act as a common task mediator to a schema. Not to define other types of data that could be returned. When querying from a Store, the developer should always expect to get back a schema instance.
Unlike preload, this will not be a direct passthrough to the Repo, instead this would parse the keyword list and always return the schema instance. If further functionality is needed then the developer can create a custom function on the store that uses the regular select option.
The purpose of the store is to act as a common task mediator to a schema. Not to define other types of data that could be returned. When querying from a Store, the developer should always expect to get back a schema instance.