Class InsertSelectStatement
- java.lang.Object
-
- org.hibernate.sql.ast.tree.AbstractStatement
-
- org.hibernate.sql.ast.tree.AbstractMutationStatement
-
- org.hibernate.sql.ast.tree.insert.InsertSelectStatement
-
- All Implemented Interfaces:
CteContainer
,InsertStatement
,MutationStatement
,Statement
public class InsertSelectStatement extends AbstractMutationStatement implements InsertStatement
todo (6.2) - Would much prefer to split insert-values and insert-select into individual contracts - something like `InsertStatement` and `InsertSelectStatement` e.g. Would help alleviate much of the duplication in handling between inserts from SQM and those from model mutation
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ALIAS
-
Constructor Summary
Constructors Constructor Description InsertSelectStatement(CteContainer cteContainer, NamedTableReference targetTable, List<ColumnReference> returningColumns)
InsertSelectStatement(NamedTableReference targetTable)
InsertSelectStatement(NamedTableReference targetTable, List<ColumnReference> returningColumns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SqlAstWalker walker)
Visitationvoid
addTargetColumnReferences(List<ColumnReference> references)
void
addTargetColumnReferences(ColumnReference... references)
void
forEachTargetColumn(BiConsumer<Integer,ColumnReference> consumer)
Iterates each target columnConflictClause
getConflictClause()
QueryPart
getSourceSelectStatement()
List<ColumnReference>
getTargetColumns()
Get all target columnsList<Values>
getValuesList()
void
setConflictClause(ConflictClause conflictClause)
void
setSourceSelectStatement(QueryPart sourceSelectStatement)
void
setValuesList(List<Values> valuesList)
-
Methods inherited from class org.hibernate.sql.ast.tree.AbstractMutationStatement
getReturningColumns, getTargetTable
-
Methods inherited from class org.hibernate.sql.ast.tree.AbstractStatement
addCteObject, addCteStatement, getCteObject, getCteObjects, getCteStatement, getCteStatements
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.ast.tree.insert.InsertStatement
getNumberOfTargetColumns
-
Methods inherited from interface org.hibernate.sql.ast.tree.MutationStatement
getReturningColumns, getTargetTable
-
-
-
-
Field Detail
-
DEFAULT_ALIAS
public static final String DEFAULT_ALIAS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InsertSelectStatement
public InsertSelectStatement(NamedTableReference targetTable)
-
InsertSelectStatement
public InsertSelectStatement(NamedTableReference targetTable, List<ColumnReference> returningColumns)
-
InsertSelectStatement
public InsertSelectStatement(CteContainer cteContainer, NamedTableReference targetTable, List<ColumnReference> returningColumns)
-
-
Method Detail
-
getTargetColumns
public List<ColumnReference> getTargetColumns()
Description copied from interface:InsertStatement
Get all target columns- Specified by:
getTargetColumns
in interfaceInsertStatement
-
forEachTargetColumn
public void forEachTargetColumn(BiConsumer<Integer,ColumnReference> consumer)
Description copied from interface:InsertStatement
Iterates each target column- Specified by:
forEachTargetColumn
in interfaceInsertStatement
-
addTargetColumnReferences
public void addTargetColumnReferences(ColumnReference... references)
-
addTargetColumnReferences
public void addTargetColumnReferences(List<ColumnReference> references)
-
getSourceSelectStatement
public QueryPart getSourceSelectStatement()
-
setSourceSelectStatement
public void setSourceSelectStatement(QueryPart sourceSelectStatement)
-
getConflictClause
public ConflictClause getConflictClause()
-
setConflictClause
public void setConflictClause(ConflictClause conflictClause)
-
accept
public void accept(SqlAstWalker walker)
Description copied from interface:Statement
Visitation
-
-