public final class Insert extends CommandWithValues implements ResultTarget
valuesExpressionListcreate, parameters, prepareAlways, session, sqlStatement, sqlTokens| 构造器和说明 |
|---|
Insert(SessionLocal session) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addAssignmentForDuplicate(Column column,
Expression expression)
Keep a collection of the columns to pass to update if a duplicate key
happens, for MySQL-style INSERT ...
|
void |
addRow(Value... values)
Add the row to the result set.
|
void |
collectDependencies(HashSet<DbObject> dependencies)
Find and collect all DbObjects, this Prepared depends on.
|
Value |
getOnDuplicateKeyValue(int columnIndex)
Get the value to use for the specified column in case of a duplicate key.
|
String |
getPlanSQL(int sqlFlags)
Get the SQL statement with the execution plan.
|
long |
getRowCount()
Get the number of rows.
|
String |
getStatementName()
Return the name of this statement.
|
Table |
getTable()
Return the target table.
|
int |
getType()
Get the command type as defined in CommandInterface
|
boolean |
isCacheable() |
void |
limitsWereApplied()
A hint that sorting, offset and limit may be ignored by this result
because they were applied during the query.
|
void |
setColumns(Column[] columns) |
void |
setCommand(Command command)
Set the command.
|
void |
setIgnore(boolean ignore)
Sets MySQL-style INSERT IGNORE mode or PostgreSQL-style ON CONFLICT
DO NOTHING.
|
void |
setInsertFromSelect(boolean value) |
void |
setOverridingSystem(Boolean overridingSystem) |
void |
setQuery(Query query) |
void |
setTable(Table table) |
long |
update(ResultTarget deltaChangeCollector,
DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
Execute the statement with specified delta change collector and collection mode.
|
addRowisTransactional, prepare, queryMeta, updatecheckCanceled, checkParameters, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getSession, getSimpleSQL, getSQL, getSQLTokens, isQuery, isReadOnly, isWithParamValues, needRecompile, query, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toStringpublic Insert(SessionLocal session)
public void setCommand(Command command)
PreparedsetCommand 在类中 Preparedcommand - the new commandpublic Table getTable()
DataChangeStatementgetTable 在类中 DataChangeStatementpublic void setTable(Table table)
public void setColumns(Column[] columns)
public void setIgnore(boolean ignore)
ignore - ignore duplicatespublic void setQuery(Query query)
public void setOverridingSystem(Boolean overridingSystem)
public void addAssignmentForDuplicate(Column column, Expression expression)
column - the columnexpression - the expressionpublic long update(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
DataChangeStatementupdate 在类中 DataChangeStatementdeltaChangeCollector - target resultdeltaChangeCollectionMode - collection modepublic void addRow(Value... values)
ResultTargetaddRow 在接口中 ResultTargetvalues - the valuespublic long getRowCount()
ResultTargetgetRowCount 在接口中 ResultTargetpublic void limitsWereApplied()
ResultTargetlimitsWereApplied 在接口中 ResultTargetpublic String getPlanSQL(int sqlFlags)
PreparedgetPlanSQL 在类中 PreparedsqlFlags - formatting flagspublic int getType()
Preparedpublic String getStatementName()
DataChangeStatementgetStatementName 在类中 DataChangeStatementpublic void setInsertFromSelect(boolean value)
public boolean isCacheable()
isCacheable 在类中 DataChangeStatementpublic Value getOnDuplicateKeyValue(int columnIndex)
columnIndex - the column indexpublic void collectDependencies(HashSet<DbObject> dependencies)
PreparedcollectDependencies 在类中 Prepareddependencies - collection of dependencies to populateCopyright © 2022. All rights reserved.