QOrder class

Represents an ORDER BY clause specification with field name and sort direction.

The QOrder class encapsulates the field to sort by and whether the sort should be in descending order. It implements the SQL interface to generate the appropriate SQL fragment.

Example usage:

var order1 = QOrder('name'); // ORDER BY `name` ASC
var order2 = QOrder('created_at', desc: true); // ORDER BY `created_at` DESC
Implemented types

Constructors

QOrder.new(String field, {bool desc = false})
Creates a new ORDER BY specification.

Properties

desc bool
Whether to sort in descending order (default is false for ascending)
getter/setter pair
field QField
The field to order by
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
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
toSQL() String
Generates the SQL fragment for this ORDER BY specification.
override
toString() String
A string representation of this object.
inherited

Operators

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