SortedEntityClass

SortedEntityClass[class,prop]

represents an entity class derived from class by sorting according to the values of the property prop.

SortedEntityClass[class,prop"order"]

sorts according to prop in the order specified.

SortedEntityClass[class,{prop1,prop2,}]

breaks ties by successively using the values of the property specifications propi.

SortedEntityClass[class,sortspec,n]

represents the first n entities of class when sorted by sortspec.

SortedEntityClass[class,sortspec,{m,n}]

represents the entities m through n of class when sorted by sortspec.

Details

Examples

open all close all

Basic Examples  (5)

Use SortedEntityClass to sort a class of entities:

In[1]:=
Click for copyable input
Out[1]=

Change the direction of the order:

In[1]:=
Click for copyable input
Out[1]=

Take only the first 10 entities:

In[1]:=
Click for copyable input
Out[1]=

Sort by multiple criteria:

In[1]:=
Click for copyable input
Out[1]=

When used with relational-database-backed entities, SortedEntityClass is equivalent to an ORDER BY statement:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Properties & Relations  (1)

Neat Examples  (1)

Introduced in 2019
(12.0)