Add a client side filter layer on top of the data store, so any filter expression can be applied to the store.
Parameter | Type | Description |
---|---|---|
args | undefined |
To control whether this layer is valid.
A user defined way to get data from store
A map from the row index of this._items to the row index of the original store.
The index of the next item in the store that is never fetched.
The original fetch function of the store.
The index in cache of the first result item
The actual size of the original store
Add data items to the cache. The insert point is at filterStartIdx
Parameter | Type | Description |
---|---|---|
items | Array | Data items to add. |
filterStartIdx | Integer | The start point to insert in the cache. |
Apply the filter to a row of data
Parameter | Type | Description |
---|---|---|
datarow | data item | |
rowIndex | Integer |
whether this row survived the filter.
Logically, the user's query is completed here, i.e., all the filtered results are ready. (or their index mappings are ready)
Parameter | Type | Description |
---|---|---|
userRequest | request object |
Parameter | Type | Description |
---|---|---|
datarow | undefined | |
colName | undefined | |
rowIndex | undefined | |
store | undefined |
Use the filter expression to filter items. Survived items are stored in this._items. The given items start from "startIdx" in the original store.
Parameter | Type | Description |
---|---|---|
items | Array | |
startIdx | Integer | |
userRequest | object |
Implement _StoreLayer._fetch
Parameter | Type | Description |
---|---|---|
userRequest | undefined | |
filterRequest | dojo/data/api/Request | The actual request used in store.fetch. This function is called recursively to fill the result store items until the user specified item count is reached. Only in recursive calls, this parameter is valid. |
Check whether all the items in the original store have been fetched.
Do the actual unwrapping to the store.
Parameter | Type | Description |
---|---|---|
nextLayer | undefined |
Do the actual wrapping (or 'hacking' if you like) to the store.
Parameter | Type | Description |
---|---|---|
store | undefined | The store to be unwrapped. |
funcName | undefined | |
layerFuncName | undefined | |
nextLayer | undefined |
The get/set function of the enabled status of this layer
Parameter | Type | Description |
---|---|---|
toEnable | Boolean |
Optional If given, is a setter, otherwise, it's getter. |
The get/set function for fetchAll.
Parameter | Type | Description |
---|---|---|
toFetchAll | boolean |
Optional If provided, it's a set function, otherwise it's a get function. |
Whether fetch all on first filter if this is a getter
See _FilterLayerMixin.filterDef
Parameter | Type | Description |
---|---|---|
filter | (_ConditionExpr | null) |
Optional
|
Parameter | Type | Description |
---|---|---|
store | undefined |
Clear all the status information of this layer
Get the name of this store layer. The default name retrieved from class name, which should have a pattern of "{name}Layer". If this pattern does not exist, the whole class name will be this layer's name. It's better to override this method if your class name is too complicated.
The name of this layer.
Set the user defined way to retrieve data from store.
Parameter | Type | Description |
---|---|---|
getter | function |
Parameter | Type | Description |
---|---|---|
store | undefined |
This function is used to replace the user's onFetchBegin in store.fetch
Parameter | Type | Description |
---|---|---|
size | Integer | |
req | request object |
Parameter | Type | Description |
---|---|---|
filter | undefined |
Called when store data is filtered. This event is before onComplete, after onBegin.
Parameter | Type | Description |
---|---|---|
filteredSize | Integer | The number of remaining fetched items after filtering. |
totalSize | Integer | The number of original fetched items. |
Parameter | Type | Description |
---|---|---|
mapping | undefined |