java.lang.Object
org.litebridge.db.spi.expression.LiteralExpression
- All Implemented Interfaces:
SelectExpression
An encapsulated literal value in a query expression.
-
Constructor Summary
ConstructorsConstructorDescriptionLiteralExpression(@Nullable Object value) Constructs a newLiteralExpressionwith the given value. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()toBindValueSql(Operation operation) Generates a SQL fragment with a placeholder for a bind value.toSql(Operation operation, ClauseType clause, @Nullable DelegateExpression parent) Creates a SQL representation of the expression, providing the immediate nesting/parent expression.toString()@Nullable Objectvalue()Retrieves the value of this literal expression.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.litebridge.db.spi.expression.SelectExpression
toSql
-
Constructor Details
-
LiteralExpression
Constructs a newLiteralExpressionwith the given value.- Parameters:
value- the literal value to be represented
-
-
Method Details
-
value
Retrieves the value of this literal expression.- Returns:
- the literal value encapsulated by this expression
-
toSql
Description copied from interface:SelectExpressionCreates a SQL representation of the expression, providing the immediate nesting/parent expression.- Specified by:
toSqlin interfaceSelectExpression- Parameters:
operation- the operation that is being executedclause- The current clause type being evaluatedparent- The parent expression/nesting expression, ornullif this is a top-level expression- Returns:
- the SQL representation of the expression
-
toBindValueSql
Generates a SQL fragment with a placeholder for a bind value.- Parameters:
operation- the database operation context- Returns:
- the SQL fragment with bind placeholders
-
equals
-
hashCode
public int hashCode() -
toString
-