Package dev.roanh.gmark.lang.generic
Class GenericConcatenation<T extends QueryLanguageSyntax>
java.lang.Object
dev.roanh.gmark.lang.generic.GenericConcatenation<T>
- Type Parameters:
T
- The concrete query language fragment syntax.
- All Implemented Interfaces:
QueryFragment
,OutputFormal
,OutputSQL
public abstract class GenericConcatenation<T extends QueryLanguageSyntax>
extends Object
implements OutputSQL, OutputFormal, QueryFragment
Generic definition of a number of query language fragments.
(also known as the join operation).
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
GenericConcatenation
(List<T> elements) Constructs a new concatenation with the given list of fragments. -
Method Summary
Modifier and TypeMethodDescriptionThe top level operation represented by this query fragment.Converts this query fragment to an equivalent abstract syntax tree.Converts this object to its formal logic form.toString()
void
writeSQL
(IndentWriter writer) Writes the SQL representation of this object to the given writer.
-
Field Details
-
elements
The sub queries to concatenate in order from first to last.
-
-
Constructor Details
-
GenericConcatenation
Constructs a new concatenation with the given list of fragments.- Parameters:
elements
- The query language fragments to concatenate.- Throws:
IllegalArgumentException
- When the given list of fragments is empty.
-
-
Method Details
-
toFormalSyntax
Description copied from interface:OutputFormal
Converts this object to its formal logic form.- Specified by:
toFormalSyntax
in interfaceOutputFormal
- Returns:
- The formal representation of this object.
-
toString
-
writeSQL
Description copied from interface:OutputSQL
Writes the SQL representation of this object to the given writer. -
getOperationType
Description copied from interface:QueryFragment
The top level operation represented by this query fragment.- Specified by:
getOperationType
in interfaceQueryFragment
- Returns:
- The top level operation for this query fragment.
-
toAbstractSyntaxTree
Description copied from interface:QueryFragment
Converts this query fragment to an equivalent abstract syntax tree.- Specified by:
toAbstractSyntaxTree
in interfaceQueryFragment
- Returns:
- The constructed Abstract Syntax Tree (AST).
-