OrderTerm class

Helper class to track ordering information for Drift and Supabase queries.

This class stores the column to order by and the ordering preferences. It can be used to generate both Drift and Supabase ordering expressions.

Example:

final orderTerm = OrderTerm(
  UserColumn.createdAt,
  ascending: false,
  nullsFirst: false,
);

Constructors

OrderTerm.new(TetherColumn column, {bool ascending = true, bool nullsFirst = false})
Creates an order term with the specified column and options.
OrderTerm.asc(TetherColumn column, {bool nullsFirst = false})
Creates an ascending order term.
factory
OrderTerm.desc(TetherColumn column, {bool nullsFirst = false})
Creates a descending order term.
factory

Properties

ascending bool
Whether the order should be ascending (true) or descending (false).
final
column TetherColumn
The Supabase column to order by.
final
hashCode int
The hash code for this object.
no setteroverride
nullsFirst bool
Whether NULL values should appear first (true) or last (false).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
toSupabaseOrderString() String
Creates a Supabase order string for this term.

Operators

operator ==(Object other) bool
The equality operator.
override