public class Insert extends ProcedureContainer
LanguageObject.Util
tempGroupIDs, TYPE_ALTER_PROC, TYPE_ALTER_TRIGGER, TYPE_ALTER_VIEW, TYPE_BATCHED_UPDATE, TYPE_CREATE, TYPE_DELETE, TYPE_DROP, TYPE_DYNAMIC, TYPE_INSERT, TYPE_QUERY, TYPE_SOURCE_EVENT, TYPE_STORED_PROCEDURE, TYPE_TRIGGER_ACTION, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_UPDATE_PROCEDURE
Constructor and Description |
---|
Insert()
Constructs a default instance of this class.
|
Insert(GroupSymbol group,
List<ElementSymbol> variables,
List values)
Construct an instance with group, variable list (may be null), and values
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
void |
addValue(Expression value)
Adds a value to the list of values
|
void |
addVariable(ElementSymbol var)
Add a variable to end of list
|
void |
addVariables(Collection<ElementSymbol> vars)
Add a collection of variables to end of list
|
boolean |
areResultsCachable()
Whether the results are cachable.
|
Object |
clone()
Return a deep copy of this Insert.
|
boolean |
equals(Object obj)
Compare two Insert commands for equality.
|
Criteria |
getConstraint() |
GroupSymbol |
getGroup()
Returns the group being inserted into
|
List<Expression> |
getProjectedSymbols()
Get the ordered list of all elements returned by this query.
|
QueryCommand |
getQueryExpression() |
TupleSource |
getTupleSource() |
int |
getType()
Return type of command.
|
List |
getValues()
Returns a list of values to insert
to be inserted.
|
List<ElementSymbol> |
getVariables()
Return an ordered List of variables, may be null if no columns were specified
|
int |
hashCode()
Get hashcode for command.
|
boolean |
isUpsert() |
void |
setConstraint(Criteria constraint) |
void |
setGroup(GroupSymbol group)
Set the group for this insert statement
|
void |
setQueryExpression(QueryCommand query) |
void |
setTupleSource(TupleSource tupleSource) |
void |
setUpsert(boolean merge) |
void |
setValues(List values)
Sets the values to be inserted.
|
void |
setVariables(Collection<ElementSymbol> vars)
Set a collection of variables that replace the existing variables
|
addTag, copyMetadataState, getUpdateCount, getUpdateInfo, hasTag, setUpdateCount, setUpdateInfo
addExternalGroupToContext, copyMetadataState, getAllExternalGroups, getCacheHint, getCommandToken, getCorrelatedReferences, getExternalGroupContexts, getOption, getProcessorPlan, getResultSetColumns, getSourceHint, getTemporaryMetadata, getUpdateCommandSymbol, printCommandTree, printCommandTree, pushNewResolvingContext, returnsResultSet, sameOptionAndHint, setCacheHint, setCorrelatedReferences, setExternalGroupContexts, setOption, setProcessorPlan, setSourceHint, setTemporaryMetadata, toString
public Insert()
public Insert(GroupSymbol group, List<ElementSymbol> variables, List values)
group
- Group associated with this insertvariables
- List of ElementSymbols that represent columns for the values, null implies all columnsvalues
- List of Expression values to be insertedpublic int getType()
public GroupSymbol getGroup()
public void setGroup(GroupSymbol group)
group
- Group to be inserted intopublic List<ElementSymbol> getVariables()
ElementSymbol
public void addVariable(ElementSymbol var)
var
- Variable to add to the listpublic void addVariables(Collection<ElementSymbol> vars)
vars
- Variables to add to the list - collection of ElementSymbolpublic List getValues()
Expression
spublic void setValues(List values)
values
- List of Expression
spublic void setVariables(Collection<ElementSymbol> vars)
vars
- Variables to be set on this object (ElementSymbols)public void addValue(Expression value)
value
- Expression to be added to the list of valuespublic void setQueryExpression(QueryCommand query)
public QueryCommand getQueryExpression()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
visitor
- Visitor being usedpublic int hashCode()
public boolean equals(Object obj)
public Object clone()
clone
in interface LanguageObject
clone
in class Command
public List<Expression> getProjectedSymbols()
getProjectedSymbols
in class Command
public boolean areResultsCachable()
Command
areResultsCachable
in class Command
Command.areResultsCachable()
public void setTupleSource(TupleSource tupleSource)
public TupleSource getTupleSource()
public Criteria getConstraint()
public void setConstraint(Criteria constraint)
public boolean isUpsert()
public void setUpsert(boolean merge)
Copyright © 2019. All rights reserved.