Class ParsingFragment<T extends DataType>
- java.lang.Object
-
- com.apple.foundationdb.relational.api.fluentsql.expression.ParsingFragment<T>
-
- Type Parameters:
T
- The type of the fragment.
- All Implemented Interfaces:
Expression<T>
,ExpressionFragment<T>
@API(EXPERIMENTAL) public class ParsingFragment<T extends DataType> extends java.lang.Object implements ExpressionFragment<T>
This represents an opaque query fragment, this is usually used in two situations.-
Building structured query from a given SQL statement: the builder uses
ParsingFragment
to save chunks of the query string without going deeper into processing them and modelling them into a correspondingExpression<?>
tree, this is required to capture expressions that can not be represented at compile time such as complex boolean expression trees inwhere
clause, or to "glance over" certain parts of the query that are irrelevant for the builder for performance reasons. -
Query decoration: The user wants to decorate the query with expressions not (yet) supported by the
ExpressionFactory
.
-
-
Constructor Summary
Constructors Constructor Description ParsingFragment(T dataType, java.lang.String fragment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,C>
Raccept(FluentVisitor<R,C> visitor, C context)
boolean
equals(java.lang.Object o)
java.lang.String
getFragment()
DataType
getType()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ParsingFragment
public ParsingFragment(@Nonnull T dataType, @Nonnull java.lang.String fragment)
-
-
Method Detail
-
accept
@Nullable public <R,C> R accept(@Nonnull FluentVisitor<R,C> visitor, @Nonnull C context)
- Specified by:
accept
in interfaceExpression<T extends DataType>
-
getType
public DataType getType()
- Specified by:
getType
in interfaceExpression<T extends DataType>
-
getFragment
@Nonnull public java.lang.String getFragment()
- Specified by:
getFragment
in interfaceExpressionFragment<T extends DataType>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-