Skip to main content

EntitiesOrderBy

Methods to use when ordering Entity.

enum EntitiesOrderBy {
NATURAL
ID_ASC
ID_DESC
CREATED_AT_ASC
CREATED_AT_DESC
CREATED_AT_BLOCK_ASC
CREATED_AT_BLOCK_DESC
UPDATED_AT_ASC
UPDATED_AT_DESC
UPDATED_AT_BLOCK_ASC
UPDATED_AT_BLOCK_DESC
PRIMARY_KEY_ASC
PRIMARY_KEY_DESC
}

Values

EntitiesOrderBy.NATURAL

No explicit ordering; results return in the database's natural order. Avoid for paginated queries — use a deterministic order instead.

EntitiesOrderBy.ID_ASC

Order results by id ascending.

EntitiesOrderBy.ID_DESC

Order results by id descending.

EntitiesOrderBy.CREATED_AT_ASC

Order results by created at ascending.

EntitiesOrderBy.CREATED_AT_DESC

Order results by created at descending.

EntitiesOrderBy.CREATED_AT_BLOCK_ASC

Order results by created at block ascending.

EntitiesOrderBy.CREATED_AT_BLOCK_DESC

Order results by created at block descending.

EntitiesOrderBy.UPDATED_AT_ASC

Order results by updated at ascending.

EntitiesOrderBy.UPDATED_AT_DESC

Order results by updated at descending.

EntitiesOrderBy.UPDATED_AT_BLOCK_ASC

Order results by updated at block ascending.

EntitiesOrderBy.UPDATED_AT_BLOCK_DESC

Order results by updated at block descending.

EntitiesOrderBy.PRIMARY_KEY_ASC

Order results by primary key ascending.

EntitiesOrderBy.PRIMARY_KEY_DESC

Order results by primary key descending.

Member Of

entities query ● entitiesConnection query

:::tip See also

Cookbook recipes that use this:

:::