public class InsertCommand extends BaseAxionCommand
| Modifier and Type | Field and Description |
|---|---|
static int |
WHEN_ALL |
static int |
WHEN_FIRST |
| Constructor and Description |
|---|
InsertCommand() |
InsertCommand(TableIdentifier table,
java.util.List columns,
AxionCommand subSelect) |
InsertCommand(TableIdentifier table,
java.util.List columns,
boolean defaultVAlues) |
InsertCommand(TableIdentifier table,
java.util.List columns,
java.util.List values) |
InsertCommand(TableIdentifier table,
java.util.List columns,
SubSelectCommand subSelect) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInsertIntoClause(DMLWhenClause when,
TableIdentifier table,
java.util.List columns,
java.util.List values) |
protected void |
buildBindVariables() |
boolean |
execute(Database database)
Executes an SQL statement that may return multiple results.
|
AxionResultSet |
executeQuery(Database database)
Unsupported, use
executeUpdate(org.axiondb.Database)instead. |
int |
executeUpdate(Database db)
Executes an SQL that may add, delete or modify zero or more rows within the
database, such as an INSERT, UPDATE or DELETE statement.
|
java.util.Iterator |
getColumnIterator() |
TableIdentifier |
getTable() |
java.util.Iterator |
getValueIterator() |
boolean |
isInsertIntoListEmpty() |
protected void |
resolve(Database db) |
void |
setElseClause(TableIdentifier table,
java.util.List tableColumns,
java.util.List tableValues) |
void |
setMultiTableEvaluationMode(int mode) |
void |
setSubSelect(SubSelectCommand select) |
assertNotReadOnly, attemptToConvertValue, bindAll, clearBindings, createResolveSelectableVisitor, executeQuery, getBindVariableIterator, getBindVariableIterator, getBindVariables, getBindVariableVisitor, getColIdentifierList, getCommitSize, getEffectedRowCount, getResultSet, getRowIterator, makeRowDecorator, populateDefaultValues, populateSequenceColumns, resolveGeneratedColumns, resolveGeneratedColumns, resolveSelectable, resolveSelectable, resolveSelectableList, resolveSelectableList, setBindVariableVisitor, setDeferAllConstraintIfRequired, setEffectedRowCount, setResultSet, updateGeneratedValuespublic static final int WHEN_ALL
public static final int WHEN_FIRST
public InsertCommand()
public InsertCommand(TableIdentifier table, java.util.List columns, AxionCommand subSelect)
public InsertCommand(TableIdentifier table, java.util.List columns, SubSelectCommand subSelect)
public InsertCommand(TableIdentifier table, java.util.List columns, java.util.List values)
table - The table in which to insertcolumns - List of ColumnIdentifiers, which may be
nullvalues - List of Objects, which may be nullInvalidArgumentException - if
columns.size() > 0 && columns.size() != values.size()public InsertCommand(TableIdentifier table, java.util.List columns, boolean defaultVAlues)
public void addInsertIntoClause(DMLWhenClause when, TableIdentifier table, java.util.List columns, java.util.List values)
public final boolean isInsertIntoListEmpty()
public boolean execute(Database database) throws AxionException
AxionCommandResultSets were generated,
false otherwiseAxionExceptionStatement.execute(java.lang.String),
PreparedStatement.execute()public AxionResultSet executeQuery(Database database) throws AxionException
executeUpdate(org.axiondb.Database)instead.ResultSetjava.lang.UnsupportedOperationExceptionAxionExceptionStatement.executeQuery(java.lang.String),
PreparedStatement.executeQuery()public int executeUpdate(Database db) throws AxionException
AxionCommandAxionExceptionStatement.executeUpdate(java.lang.String),
PreparedStatement.executeUpdate()public final java.util.Iterator getColumnIterator()
public final TableIdentifier getTable()
public final java.util.Iterator getValueIterator()
public void setElseClause(TableIdentifier table, java.util.List tableColumns, java.util.List tableValues)
public void setMultiTableEvaluationMode(int mode)
public void setSubSelect(SubSelectCommand select)
protected void buildBindVariables()
buildBindVariables in class BaseAxionCommandprotected void resolve(Database db) throws AxionException
AxionException