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 empty
fromTable - the FROM table name
fromAlias - optional table alias, or null
joins - full JOIN clauses, or null
where - AND-combined predicate fragments, or null/empty
groupBy - GROUP BY expressions, or null/empty
orderBy - ORDER BY terms (e.g. "t0._date DESC"), or null/empty
limit - optional LIMIT
offset - 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 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 a RenderModel record class.
      Parameters:
      select - the value for the select record component
      fromTable - the value for the fromTable record component
      fromAlias - the value for the fromAlias record component
      joins - the value for the joins record component
      where - the value for the where record component
      groupBy - the value for the groupBy record component
      orderBy - the value for the orderBy record component
      limit - the value for the limit record component
      offset - the value for the offset record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • select

      public List<String> select()
      Returns the value of the select record component.
      Returns:
      the value of the select record component
    • fromTable

      public String fromTable()
      Returns the value of the fromTable record component.
      Returns:
      the value of the fromTable record component
    • fromAlias

      public String fromAlias()
      Returns the value of the fromAlias record component.
      Returns:
      the value of the fromAlias record component
    • joins

      public List<String> joins()
      Returns the value of the joins record component.
      Returns:
      the value of the joins record component
    • where

      public List<String> where()
      Returns the value of the where record component.
      Returns:
      the value of the where record component
    • groupBy

      public List<String> groupBy()
      Returns the value of the groupBy record component.
      Returns:
      the value of the groupBy record component
    • orderBy

      public List<String> orderBy()
      Returns the value of the orderBy record component.
      Returns:
      the value of the orderBy record component
    • limit

      public Integer limit()
      Returns the value of the limit record component.
      Returns:
      the value of the limit record component
    • offset

      public Integer offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component