net.sf.saffron.sql
Class SqlInsert
java.lang.Object
|
+--net.sf.saffron.sql.SqlNode
|
+--net.sf.saffron.sql.SqlCall
|
+--net.sf.saffron.sql.SqlInsert
- public class SqlInsert
- extends SqlCall
A SqlInsert
is a node of a parse tree which represents
an INSERT statement.
TARGET_TABLE_OPERAND
public static final int TARGET_TABLE_OPERAND
- See Also:
- Constant Field Values
SOURCE_OPERAND
public static final int SOURCE_OPERAND
- See Also:
- Constant Field Values
TARGET_COLUMN_LIST_OPERAND
public static final int TARGET_COLUMN_LIST_OPERAND
- See Also:
- Constant Field Values
OPERAND_COUNT
public static final int OPERAND_COUNT
- See Also:
- Constant Field Values
SqlInsert
public SqlInsert(SqlSpecialOperator operator,
SqlIdentifier targetTable,
SqlNode source,
SqlNodeList columnList)
getTargetTable
public SqlIdentifier getTargetTable()
- .
- Returns:
- the identifier for the target table of the insertion
getSourceSelect
public SqlSelect getSourceSelect()
- Get the source SELECT expression for the data to be inserted. It is
only safe to call this after non-SELECT source expressions (e.g. VALUES)
have been expanded by SqlValidator.createInternalSelect
- Returns:
- the source SELECT for the data to be inserted
getSource
public SqlNode getSource()
- .
- Returns:
- the source expression for the data to be inserted
getTargetColumnList
public SqlNodeList getTargetColumnList()
- .
- Returns:
- the list of target column names, or null for all columns in the
target table
unparse
public void unparse(SqlWriter writer,
int leftPrec,
int rightPrec)
- Description copied from class:
SqlNode
- Writes a SQL representation of this node to a writer.
- Overrides:
unparse
in class SqlCall