Package com.onec.query
Record Class SqlRenderer.RenderModel
java.lang.Object
java.lang.Record
com.onec.query.SqlRenderer.RenderModel
- Record Components:
select- select-list items (e.g."t0._code AS code"); never emptyfromTable- the FROM table namefromAlias- optional table alias, ornulljoins- full JOIN clauses, ornullwhere- AND-combined predicate fragments, ornull/emptygroupBy- GROUP BY expressions, ornull/emptyorderBy- ORDER BY terms (e.g."t0._date DESC"), ornull/emptylimit- optional LIMIToffset- optional OFFSET
- Enclosing class:
SqlRenderer
public static record SqlRenderer.RenderModel(List<String> select, String fromTable, String fromAlias, List<String> joins, List<String> where, List<String> groupBy, List<String> orderBy, Integer limit, Integer offset)
extends Record
Pre-rendered SQL fragments for one statement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromAliasrecord component.Returns the value of thefromTablerecord component.groupBy()Returns the value of thegroupByrecord component.final inthashCode()Returns a hash code value for this object.joins()Returns the value of thejoinsrecord component.limit()Returns the value of thelimitrecord component.offset()Returns the value of theoffsetrecord component.orderBy()Returns the value of theorderByrecord component.select()Returns the value of theselectrecord component.final StringtoString()Returns a string representation of this record class.where()Returns the value of thewhererecord component.
-
Constructor Details
-
RenderModel
public RenderModel(List<String> select, String fromTable, String fromAlias, List<String> joins, List<String> where, List<String> groupBy, List<String> orderBy, Integer limit, Integer offset) Creates an instance of aRenderModelrecord class.- Parameters:
select- the value for theselectrecord componentfromTable- the value for thefromTablerecord componentfromAlias- the value for thefromAliasrecord componentjoins- the value for thejoinsrecord componentwhere- the value for thewhererecord componentgroupBy- the value for thegroupByrecord componentorderBy- the value for theorderByrecord componentlimit- the value for thelimitrecord componentoffset- the value for theoffsetrecord 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). -
select
Returns the value of theselectrecord component.- Returns:
- the value of the
selectrecord component
-
fromTable
Returns the value of thefromTablerecord component.- Returns:
- the value of the
fromTablerecord component
-
fromAlias
Returns the value of thefromAliasrecord component.- Returns:
- the value of the
fromAliasrecord component
-
joins
Returns the value of thejoinsrecord component.- Returns:
- the value of the
joinsrecord component
-
where
Returns the value of thewhererecord component.- Returns:
- the value of the
whererecord component
-
groupBy
Returns the value of thegroupByrecord component.- Returns:
- the value of the
groupByrecord component
-
orderBy
Returns the value of theorderByrecord component.- Returns:
- the value of the
orderByrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-