Class LiteralExpression

java.lang.Object
org.litebridgedb.db.spi.expression.LiteralExpression
All Implemented Interfaces:
SelectExpression

public class LiteralExpression extends Object implements SelectExpression
An encapsulated literal value in a query expression.
  • Constructor Details

    • LiteralExpression

      public LiteralExpression(@Nullable Object value)
      Constructs a new LiteralExpression with the given value.
      Parameters:
      value - the literal value to be represented
  • Method Details

    • value

      public @Nullable Object value()
      Retrieves the value of this literal expression.
      Returns:
      the literal value encapsulated by this expression
    • toSql

      public String toSql(Operation operation)
      Description copied from interface: SelectExpression
      Creates a SQL representation of the expression.
      Specified by:
      toSql in interface SelectExpression
      Parameters:
      operation - the operation that is being executed
      Returns:
      the SQL representation of the expression
    • toBindValueSql

      public String toBindValueSql(Operation operation)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object