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 thisDataProvider
total_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_result
find_result
- value, which been returned byfind/1
function of user'sDataProvider
implementation
Function will execute behaviour depending on what value was in find_result
If received
find_result
is aEcto.Query
then it will be processed byDataProvider.QueryModifier
. The reveived query will be executed and result of execution gonna be put intoitems
of newDataProvider.Data
struct.If received
find_result
is alist()
, then it will be processed byDataProvider.ListModifier
. The received data will be put intoitems
of newDataProvider.Data
struct.