Class InsertStatementContext
- java.lang.Object
-
- org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext
-
- org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext
-
- All Implemented Interfaces:
ParameterAware,SQLStatementContext,TableAvailable
public final class InsertStatementContext extends CommonSQLStatementContext implements TableAvailable, ParameterAware
Insert SQL statement context.
-
-
Constructor Summary
Constructors Constructor Description InsertStatementContext(ShardingSphereMetaData metaData, List<Object> params, org.apache.shardingsphere.sql.parser.sql.common.statement.dml.InsertStatement sqlStatement, String defaultDatabaseName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsInsertColumns()Judge whether contains insert columns.Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment>getAllTables()Get all table segments.Iterator<String>getDescendingColumnNames()Get column names for descending order.Optional<GeneratedKeyContext>getGeneratedKeyContext()Get generated key context.List<List<Object>>getGroupedParameters()Get grouped parameters.List<String>getInsertColumnNames()Get insert column names.List<Object>getOnDuplicateKeyUpdateParameters()Get on duplicate key update parameters.org.apache.shardingsphere.sql.parser.sql.common.statement.dml.InsertStatementgetSqlStatement()Get SQL statement.intgetValueListCount()Get value list count.voidsetUpParameters(List<Object> params)Set up parameters.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.shardingsphere.infra.binder.statement.SQLStatementContext
getDatabaseType, getTablesContext
-
Methods inherited from interface org.apache.shardingsphere.infra.binder.type.TableAvailable
getTablesContext
-
-
-
-
Constructor Detail
-
InsertStatementContext
public InsertStatementContext(ShardingSphereMetaData metaData, List<Object> params, org.apache.shardingsphere.sql.parser.sql.common.statement.dml.InsertStatement sqlStatement, String defaultDatabaseName)
-
-
Method Detail
-
getDescendingColumnNames
public Iterator<String> getDescendingColumnNames()
Get column names for descending order.- Returns:
- column names for descending order
-
getGroupedParameters
public List<List<Object>> getGroupedParameters()
Get grouped parameters.- Returns:
- grouped parameters
-
getOnDuplicateKeyUpdateParameters
public List<Object> getOnDuplicateKeyUpdateParameters()
Get on duplicate key update parameters.- Returns:
- on duplicate key update parameters
-
getGeneratedKeyContext
public Optional<GeneratedKeyContext> getGeneratedKeyContext()
Get generated key context.- Returns:
- generated key context
-
containsInsertColumns
public boolean containsInsertColumns()
Judge whether contains insert columns.- Returns:
- contains insert columns or not
-
getValueListCount
public int getValueListCount()
Get value list count.- Returns:
- value list count
-
getInsertColumnNames
public List<String> getInsertColumnNames()
Get insert column names.- Returns:
- column names collection
-
getSqlStatement
public org.apache.shardingsphere.sql.parser.sql.common.statement.dml.InsertStatement getSqlStatement()
Description copied from interface:SQLStatementContextGet SQL statement.- Specified by:
getSqlStatementin interfaceSQLStatementContext- Returns:
- SQL statement
-
getAllTables
public Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment> getAllTables()
Description copied from interface:TableAvailableGet all table segments.- Specified by:
getAllTablesin interfaceTableAvailable- Returns:
- all table segments
-
setUpParameters
public void setUpParameters(List<Object> params)
Description copied from interface:ParameterAwareSet up parameters.- Specified by:
setUpParametersin interfaceParameterAware- Parameters:
params- parameters
-
-