java.lang.Object
java.lang.Record
org.litebridgedb.db.spi.query.Select
- Record Components:
table- The main table from which data is being selected.columns- A list of columns to be included in the SELECT query.joins- A list of joins that define relationships with other tables.orderBy- A list of ordering instructions specifying the order of the result set.where- A list of conditions used to filter the data in the SELECT query.limit- Optional pagination settings for limiting the number of rows in the result set.
public record Select(Table table, List<Column> columns, List<Join> joins, List<OrderBy> orderBy, List<Condition> where, Optional<Limit> limit)
extends Record
SQL SELECT query structure.
This record encapsulates the components of a SELECT query, including the target table, a list of columns to retrieve, joins for combining data from other tables, conditions for filtering data, ordering instructions, and optional pagination settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolumns()Returns the value of thecolumnsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.joins()Returns the value of thejoinsrecord component.limit()Returns the value of thelimitrecord component.orderBy()Returns the value of theorderByrecord component.table()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.where()Returns the value of thewhererecord component.
-
Constructor Details
-
Select
public Select(Table table, List<Column> columns, List<Join> joins, List<OrderBy> orderBy, List<Condition> where, Optional<Limit> limit) Creates an instance of aSelectrecord class.- Parameters:
table- the value for thetablerecord componentcolumns- the value for thecolumnsrecord componentjoins- the value for thejoinsrecord componentorderBy- the value for theorderByrecord componentwhere- the value for thewhererecord componentlimit- the value for thelimitrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
table
Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-
columns
Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-
joins
Returns the value of thejoinsrecord component.- Returns:
- the value of the
joinsrecord component
-
orderBy
Returns the value of theorderByrecord component.- Returns:
- the value of the
orderByrecord component
-
where
Returns the value of thewhererecord component.- Returns:
- the value of the
whererecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-