Record Class SetNode

java.lang.Object
java.lang.Record
org.litebridge.orm.api.select.ast.SetNode
Record Components:
previous - the previous node in the chain
column - the column to update
value - the value to set (can be a raw value or a MathOperation)
bindValue - whether the value should be bound as a parameter
All Implemented Interfaces:
QueryNode

public record SetNode(@Nullable QueryNode previous, Column column, @Nullable Object value, boolean bindValue) extends Record implements QueryNode
Represents a SET clause in an UPDATE statement in the query AST.
  • Constructor Details

    • SetNode

      public SetNode(@Nullable QueryNode previous, Column column, Object value)
    • SetNode

      public SetNode(@Nullable QueryNode previous, Column column, @Nullable Object value, boolean bindValue)
      Creates an instance of a SetNode record class.
      Parameters:
      previous - the value for the previous record component
      column - the value for the column record component
      value - the value for the value record component
      bindValue - the value for the bindValue record component
  • Method Details

    • equals

      public 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.
    • hashCode

      public 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
    • 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
    • previous

      public @Nullable QueryNode previous()
      Returns the value of the previous record component.
      Specified by:
      previous in interface QueryNode
      Returns:
      the value of the previous record component
    • column

      public Column column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component
    • value

      public @Nullable Object value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • bindValue

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