Class DefaultMarkerExpression
java.lang.Object
dev.frostlake.executor.expressions.DefaultMarkerExpression
- All Implemented Interfaces:
Expression
The bare word
DEFAULT where a DML value is expected — INSERT … VALUES (DEFAULT),
UPDATE t SET c = DEFAULT, and the same two inside MERGE. It means "write this column's
declared default", so it is not a value at all until a target column is known, which is why it
travels as a marker instead of evaluating to something.
The line live draws is where the word STANDS ALONE. In any larger expression it is an ordinary
name that resolves to nothing — UPDATE t SET c = DEFAULT + 1 is "invalid identifier
'DEFAULT'" — and that falls out of this design rather than being coded twice: a write path takes the
marker only when it IS the whole value, and every other route evaluates it, which raises exactly
that refusal.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ExpressionVisitor<T> visitor) Accept a visitor for the visitor patterngetWhere()Where the word was written, for the refusal raised when it is evaluated rather than written.toString()
-
Constructor Details
-
DefaultMarkerExpression
-
-
Method Details
-
getWhere
Where the word was written, for the refusal raised when it is evaluated rather than written. -
accept
Description copied from interface:ExpressionAccept a visitor for the visitor pattern- Specified by:
acceptin interfaceExpression
-
toString
-