DataProvider.Data (DataProvider v1.2.1) View Source
The data module of DataProvider which result of DataProvider processing
In this struct:
items- it is a list of result user request
Link to this section Summary
Functions
Creates DataProvider.Data struct by received find_result and DataProvider.
Link to this section Types
Specs
DataProvider data value, contains:
items- List of found data for exactly thisDataProvidertotal_count- integer value with count of items initems
Link to this section Functions
Specs
create(DataProvider.t(), Ecto.Query.t() | list()) :: t()
Creates DataProvider.Data struct by received find_result and DataProvider.
Args:
data_provider- data provider, which been use by user for gettingfind_resultfind_result- value, which been returned byfind/1function of user'sDataProviderimplementation
Function will execute behaviour depending on what value was in find_result
If received
find_resultis aEcto.Querythen it will be processed byDataProvider.QueryModifier. The reveived query will be executed and result of execution gonna be put intoitemsof newDataProvider.Datastruct.If received
find_resultis alist(), then it will be processed byDataProvider.ListModifier. The received data will be put intoitemsof newDataProvider.Datastruct.