Record Class WarehouseQueryAst

java.lang.Object
java.lang.Record
app.ductape.sdk.warehouse.parser.WarehouseQueryAst

public record WarehouseQueryAst(String operation, WarehouseParsedDataSource primarySource, List<String> fields, List<WarehouseParsedJoin> joins, Map<String,Object> where, List<Map<String,Object>> orderBy, Integer limit, Integer offset, Object data, Object returning, List<String> conflictKeys, boolean hasTransaction) extends Record
TS parity: IQueryAST from query-parser.ts. Operation and sources align with WarehouseQueryTypes; where wire maps match WarehouseWhereTypes.
  • Constructor Details

    • WarehouseQueryAst

      public WarehouseQueryAst(String operation, WarehouseParsedDataSource primarySource, List<String> fields, List<WarehouseParsedJoin> joins, Map<String,Object> where, List<Map<String,Object>> orderBy, Integer limit, Integer offset, Object data, Object returning, List<String> conflictKeys, boolean hasTransaction)
      Creates an instance of a WarehouseQueryAst record class.
      Parameters:
      operation - the value for the operation record component
      primarySource - the value for the primarySource record component
      fields - the value for the fields record component
      joins - the value for the joins record component
      where - the value for the where 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
      data - the value for the data record component
      returning - the value for the returning record component
      conflictKeys - the value for the conflictKeys record component
      hasTransaction - the value for the hasTransaction 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • operation

      public String operation()
      Returns the value of the operation record component.
      Returns:
      the value of the operation record component
    • primarySource

      public WarehouseParsedDataSource primarySource()
      Returns the value of the primarySource record component.
      Returns:
      the value of the primarySource record component
    • fields

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

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

      public Map<String,Object> where()
      Returns the value of the where record component.
      Returns:
      the value of the where record component
    • orderBy

      public List<Map<String,Object>> 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
    • data

      public Object data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • returning

      public Object returning()
      Returns the value of the returning record component.
      Returns:
      the value of the returning record component
    • conflictKeys

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

      public boolean hasTransaction()
      Returns the value of the hasTransaction record component.
      Returns:
      the value of the hasTransaction record component