asc
Call Signature
Section titled “Call Signature”asc<
N>(name):OrderTerm<OrderRef<N,never>>
Defined in: src/query/order.ts:119
Sorts by an attribute, smallest first, in the order values compare in — see
ComparisonOperator. Entities where the attribute is unset, or set with another type, come
first.
Type Parameters
Section titled “Type Parameters”N extends string
Parameters
Section titled “Parameters”N
An attribute of any type but bytes, indexed or not, or one of the system
attributes $key, $owner, $creator and $expiresAt.
Returns
Section titled “Returns”OrderTerm<OrderRef<N, never>>
Throws
Section titled “Throws”If the name is outside the attribute name grammar.
Throws
Section titled “Throws”If the name starts with $ but is not a queryable system
attribute, the type is bytes or not a type, or a system attribute is given another type.
Example
Section titled “Example”asc("title") // through a schema: title:str ASCasc("score", "u256") // without one: score:u256 ASCasc("$expiresAt") // $expiresAt:u64 ASCCall Signature
Section titled “Call Signature”asc<
N,T>(name,type):OrderTerm<OrderRef<N,T>>
Defined in: src/query/order.ts:120
Sorts by an attribute, smallest first, in the order values compare in — see
ComparisonOperator. Entities where the attribute is unset, or set with another type, come
first.
Type Parameters
Section titled “Type Parameters”N extends string
T extends IndexableTypeTag
Parameters
Section titled “Parameters”N
An attribute of any type but bytes, indexed or not, or one of the system
attributes $key, $owner, $creator and $expiresAt.
T
The type to sort the attribute as. A system attribute’s is fixed, and through a schema it is the column’s, so it is needed only for a query without one.
Returns
Section titled “Returns”OrderTerm<OrderRef<N, T>>
Throws
Section titled “Throws”If the name is outside the attribute name grammar.
Throws
Section titled “Throws”If the name starts with $ but is not a queryable system
attribute, the type is bytes or not a type, or a system attribute is given another type.
Example
Section titled “Example”asc("title") // through a schema: title:str ASCasc("score", "u256") // without one: score:u256 ASCasc("$expiresAt") // $expiresAt:u64 ASC