FilteredEntityClass
FilteredEntityClass[class,f]
represents a class of entities where only entities for which the EntityFunction object f yields True are kept.
FilteredEntityClass[class,prop]
represents a class of entities where only entities for which the property prop is True are kept.
Details
- FilteredEntityClass works with any EntityStore object, whether defined explicitly or based on a RelationalDatabase object.
- EntityClass[class,prop->operator[value]] is effectively equivalent to FilteredEntityClass[class,EntityFunction[x,operator[value][x[prop]], except when operator is TakeLargest, TakeSmallest, TakeLargestBy, TakeSmallestBy or NearestTo.
Examples
open allclose allBasic Examples (3)
Filter by a Boolean EntityProperty:
Filter entities by a Boolean EntityFunction:
When used with relational-database-backed entities, FilteredEntityClass is effectively compiled to a WHERE statement:
Scope (2)
Properties & Relations (1)
Get a list of mountains in Africa with an elevation over 5 kilometers, using FilteredEntityClass:
Use an implicitly defined EntityClass to get the same list of mountains:
Text
Wolfram Research (2019), FilteredEntityClass, Wolfram Language function, https://reference.wolfram.com/language/ref/FilteredEntityClass.html.
CMS
Wolfram Language. 2019. "FilteredEntityClass." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FilteredEntityClass.html.
APA
Wolfram Language. (2019). FilteredEntityClass. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FilteredEntityClass.html