readAllFrom()
Function
readAllFrom<S, EntityType>(queryEntity:
QueryEntity<S,getEntityType<S>,getIDType<S>>):Read<EntityType[]>
Create a new Read containing an array of all entities in the used QueryEntity:
const entities$: Read<EntityState[]> = readAllFrom(queryEntity);Source: akita-read/src/lib/read-all-from.ts:28
Type parameters
| Parameter | Default | Description |
|---|---|---|
S extends EntityState<any, any> | - | entity stated used by the queryEntity |
| EntityType | getEntityType<S> | - |
Parameters
| Parameter | Type | Description |
|---|---|---|
| queryEntity | QueryEntity<S, getEntityType<S>, getIDType<S>> | QueryEntity to select from |
Returns
Read<EntityType[]>
Returns a new Read that emits an array containing all entities in the QueryEntity.
readAllFrom<S, EntityType>(queryEntity:
QueryEntity<S,getEntityType<S>,getIDType<S>>, options:SelectAllOptionsA<EntityType>):Read<HashMap<EntityType>>
Create a new Read containing an object with all entities in the used QueryEntity:
const entities$: Read<EntityState[]> = readAllFrom(queryEntity, {asObject: true});Source: akita-read/src/lib/read-all-from.ts:44
Type parameters
| Parameter | Default | Description |
|---|---|---|
S extends EntityState<any, any> | - | entity stated used by the queryEntity |
| EntityType | getEntityType<S> | - |
Parameters
| Parameter | Type | Description |
|---|---|---|
| queryEntity | QueryEntity<S, getEntityType<S>, getIDType<S>> | QueryEntity to select from |
| options | SelectAllOptionsA<EntityType> | options on how to select the entities. Check Akita-Documentation for more infos. |
Returns
Read<HashMap<EntityType>>
Returns a new Read that emits an object with all entities in the QueryEntity.
readAllFrom<S, EntityType>(queryEntity:
QueryEntity<S,getEntityType<S>,getIDType<S>>, options:SelectAllOptionsB<EntityType>):Read<EntityType[]>
Create a new Read containing an array of all entities in the used QueryEntity after applying the filter:
const entities$: Read<EntityState[]> = readAllFrom(queryEntity, {filterBy: (entity) => entity.done});Source: akita-read/src/lib/read-all-from.ts:64
Type parameters
| Parameter | Default | Description |
|---|---|---|
S extends EntityState<any, any> | - | entity stated used by the queryEntity |
| EntityType | getEntityType<S> | - |
Parameters
| Parameter | Type | Description |
|---|---|---|
| queryEntity | QueryEntity<S, getEntityType<S>, getIDType<S>> | QueryEntity to select from |
| options | SelectAllOptionsB<EntityType> | options on how to select the entities. Check Akita-Documentation for more infos. |
Returns
Read<EntityType[]>
Returns a new Read that emits an array of all entities in the QueryEntity passing the filter function.
readAllFrom<S, EntityType>(queryEntity:
QueryEntity<S,getEntityType<S>,getIDType<S>>, options:SelectAllOptionsC<EntityType>):Read<HashMap<EntityType>>
Create a new Read containing an object with all entities in the used QueryEntity:
const entities$: Read<EntityState[]> = readAllFrom(queryEntity, {asObject: true});Source: akita-read/src/lib/read-all-from.ts:83
Type parameters
| Parameter | Default | Description |
|---|---|---|
S extends EntityState<any, any> | - | entity stated used by the queryEntity |
| EntityType | getEntityType<S> | - |
Parameters
| Parameter | Type | Description |
|---|---|---|
| queryEntity | QueryEntity<S, getEntityType<S>, getIDType<S>> | QueryEntity to select from |
| options | SelectAllOptionsC<EntityType> | options on how to select the entities. Check Akita-Documentation for more infos. |
Returns
Read<HashMap<EntityType>>
Returns a new Read that emits an object with all entities in the QueryEntity.
readAllFrom<S, EntityType>(queryEntity:
QueryEntity<S,getEntityType<S>,getIDType<S>>, options:SelectAllOptionsD<EntityType>):Read<EntityType[]>
Create a new Read containing an array of all entities in the used QueryEntity limiting the count to the limit provided:
const entities$: Read<EntityState[]> = readAllFrom(queryEntity, {limitTo: 5});Source: akita-read/src/lib/read-all-from.ts:103
Type parameters
| Parameter | Default | Description |
|---|---|---|
S extends EntityState<any, any> | - | entity stated used by the queryEntity |
| EntityType | getEntityType<S> | - |
Parameters
| Parameter | Type | Description |
|---|---|---|
| queryEntity | QueryEntity<S, getEntityType<S>, getIDType<S>> | QueryEntity to select from |
| options | SelectAllOptionsD<EntityType> | options on how to select the entities. Check Akita-Documentation for more infos. |
Returns
Read<EntityType[]>
Returns a new Read that emits an array of all entities in the QueryEntity up to the limit.
readAllFrom<S, EntityType>(queryEntity:
QueryEntity<S,getEntityType<S>,getIDType<S>>, options:SelectAllOptionsE<EntityType>):Read<EntityType[]>
Create a new Read containing an array of all entities in the used QueryEntity sorted by the key:
const entities$: Read<EntityState[]> = readAllFrom(queryEntity, {sortBy: 'price', sortByOrder: Order.ASC});Source: akita-read/src/lib/read-all-from.ts:123
Type parameters
| Parameter | Default | Description |
|---|---|---|
S extends EntityState<any, any> | - | entity stated used by the queryEntity |
| EntityType | getEntityType<S> | - |
Parameters
| Parameter | Type | Description |
|---|---|---|
| queryEntity | QueryEntity<S, getEntityType<S>, getIDType<S>> | QueryEntity to select from |
| options | SelectAllOptionsE<EntityType> | options on how to select the entities. Check Akita-Documentation for more infos. |
Returns
Read<EntityType[]>
Returns a new Read that emits an array of all entities in the QueryEntity ordered according to the passed options.