java.lang.Object
java.lang.Record
org.litebridgedb.db.spi.query.OrderBy
- Record Components:
expression- The column to order by.asc- A boolean indicating whether the order is ascending (true) or descending (false).
Ordering clause in an SQL query.
This record specifies the column on which the query results should be ordered and determines whether the ordering is ascending or descending.
It is typically used in query-building processes to define the order of rows in the result set.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOrderBy(SelectExpression expression, boolean asc) Creates an instance of aOrderByrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanasc()Returns the value of theascrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpressionrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OrderBy
Creates an instance of aOrderByrecord class.- Parameters:
expression- the value for theexpressionrecord componentasc- the value for theascrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-
asc
public boolean asc()Returns the value of theascrecord component.- Returns:
- the value of the
ascrecord component
-