EmberCrossfilter Class
Item Index
Methods
- _applyContentChanges Updates the content array based on the applied filters. Any changes to the Crossfilter should mean invoke this function!
- _createCrossfilter Creates the Crossfilter from the content.
- _createDimensions Create the defined dimensions from the controller.
- _createFilterBoolean
- _setFilterBoolean
- _setFilterFunction
- _setFilterRangeMax
- _setFilterRangeMin
- _sortedContent
- _topBottom
- addFilter
- addRecord
- addRecords
- bottom Helper method to find the lowest value.
- clearAllFilters Clears all of the filters that are currently active.
- defineProperty Wrapper for the Object.defineProperty, as all of our defined dimensions will be similar in their construction.
- deleteRecord
- deleteRecords
- getBooleanType
- init Invoked when the controller is instantiated.
- isBooleanFilter
- removeFilter
- sortContent Sorts the content based on the property, and whether it should be ascending/descending.
- top Helper method to find the highest value.
Properties
Methods
_applyContentChanges
Updates the content array based on the applied filters. Any changes to the Crossfilter should
mean invoke this function!
()
Void
private
Returns:
_createCrossfilter
Creates the Crossfilter from the content.
()
Boolean
private
Returns:
_createDimensions
Create the defined dimensions from the controller.
()
Void
private
Returns:
_createFilterBoolean
-
map
Parameters:
-
map
ObjectResponsible for setting up the
filterAnd
/filterOr
methods by attaching a bitwise operator to each model.
_setFilterBoolean
-
map
-
dimension!~YUIDOC_LINE~!Implement
Parameters:
-
map
Object -
dimension!~YUIDOC_LINE~!Implement
Objecta missing Crossfilter method for checking the inArray, although if you have a small array, then you might be better off using bitwise against the filterFunction method.
Returns:
_setFilterFunction
-
map
-
dimension!~YUIDOC_LINE~!Although
Parameters:
-
map
Object -
dimension!~YUIDOC_LINE~!Although
Objectthe filterFunction is similar to filterRange, filterExact, etc... we need to invoke a user callback in order to calculate it. For this we use convention over configuration.
_setFilterRangeMax
-
map
-
dimension!~YUIDOC_LINE~!Checks
Parameters:
-
map
Object -
dimension!~YUIDOC_LINE~!Checks
Objectthe corresponding dimension for the maximum value, and then continues to create the array for the filterRange.
_setFilterRangeMin
-
map
-
dimension!~YUIDOC_LINE~!Checks
Parameters:
-
map
Object -
dimension!~YUIDOC_LINE~!Checks
Objectthe corresponding dimension for the minimum value, and then continues to create the array for the filterRange.
_sortedContent
-
content
-
property
-
isAscending
Parameters:
-
content
Array -
property
String -
isAscending
Boolean
Returns:
_topBottom
-
key
-
count
-
crossfilterMethod
Parameters:
-
key
String -
count
Number -
crossfilterMethod
String
Returns:
addFilter
-
key
-
value!~YUIDOC_LINE~!Applies
Parameters:
-
key
Object -
value!~YUIDOC_LINE~!Applies
Objecta filter to one of our pre-defined dimensions.
Returns:
addRecord
-
record
Parameters:
-
record
ObjectAdds a record to the Crossfilter.
Returns:
addRecords
-
records
Parameters:
-
records
ArrayWrapper method for adding many records to the Crossfilter.
Returns:
bottom
Helper method to find the lowest value.
-
property
-
count
Parameters:
-
property
String -
count
Number
Returns:
clearAllFilters
Clears all of the filters that are currently active.
()
Void
Returns:
defineProperty
Wrapper for the Object.defineProperty, as all of our defined dimensions will
be similar in their construction.
-
name
-
property
Parameters:
-
name
Object -
property
Object
Returns:
deleteRecord
-
record
Parameters:
-
record
ObjectDeletes a record from the Crossfilter.
Returns:
deleteRecords
-
records
Parameters:
-
records
ArrayWrapper method for deleting items from the Crossfilter.
Returns:
getBooleanType
-
map
Parameters:
-
map
Object
Returns:
init
Invoked when the controller is instantiated.
()
isBooleanFilter
-
map
Parameters:
-
map
Object
Returns:
removeFilter
-
key
-
value!~YUIDOC_LINE~!Clear
Parameters:
-
key
Object -
value!~YUIDOC_LINE~!Clear
Objectthe any applied filters to the dimension.
Returns:
sortContent
Sorts the content based on the property, and whether it should be ascending/descending.
-
property
-
isAscending
Parameters:
-
property
String -
isAscending
Boolean
Returns:
top
Helper method to find the highest value.
-
property
-
count
Parameters:
-
property
String -
count
Number