Package org.teiid.query.resolver.command
Class InsertResolver
- java.lang.Object
-
- org.teiid.query.resolver.ProcedureContainerResolver
-
- org.teiid.query.resolver.command.InsertResolver
-
- All Implemented Interfaces:
CommandResolver
,VariableResolver
public class InsertResolver extends ProcedureContainerResolver implements VariableResolver
This class knows how to expand and resolve INSERT commands.
-
-
Constructor Summary
Constructors Constructor Description InsertResolver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<ElementSymbol>
getAutoIncrementKey(Object metadataId, List<ElementSymbol> columns, QueryMetadataInterface metadata)
protected String
getPlan(QueryMetadataInterface metadata, GroupSymbol group)
For a given resolver, this returns the unparsed command.Map<ElementSymbol,Expression>
getVariableValues(Command command, boolean changingOnly, QueryMetadataInterface metadata)
protected void
resolveGroup(TempMetadataAdapter metadata, ProcedureContainer procCommand)
void
resolveProceduralCommand(Command command, TempMetadataAdapter metadata)
Resolve an INSERT.void
resolveTypes(Insert insert, TempMetadataAdapter metadata, List values, boolean usingQuery)
-
Methods inherited from class org.teiid.query.resolver.ProcedureContainerResolver
addChanging, addScalarGroup, addScalarGroup, addScalarGroup, expandCommand, findChildCommandMetadata, getUpdateInfo, getUpdateInfo, resolveCommand, validateUpdateInfo
-
-
-
-
Method Detail
-
resolveProceduralCommand
public void resolveProceduralCommand(Command command, TempMetadataAdapter metadata) throws QueryMetadataException, QueryResolverException, TeiidComponentException
Resolve an INSERT. Need to resolve elements, constants, types, etc.
-
resolveTypes
public void resolveTypes(Insert insert, TempMetadataAdapter metadata, List values, boolean usingQuery) throws QueryResolverException
- Parameters:
insert
-values
-usingQuery
-- Throws:
QueryResolverException
-
getPlan
protected String getPlan(QueryMetadataInterface metadata, GroupSymbol group) throws TeiidComponentException, QueryMetadataException
Description copied from class:ProcedureContainerResolver
For a given resolver, this returns the unparsed command.- Specified by:
getPlan
in classProcedureContainerResolver
- Parameters:
metadata
-group
-- Returns:
- Throws:
TeiidComponentException
QueryMetadataException
-
resolveGroup
protected void resolveGroup(TempMetadataAdapter metadata, ProcedureContainer procCommand) throws TeiidComponentException, QueryResolverException
-
getVariableValues
public Map<ElementSymbol,Expression> getVariableValues(Command command, boolean changingOnly, QueryMetadataInterface metadata) throws QueryMetadataException, QueryResolverException, TeiidComponentException
- Specified by:
getVariableValues
in interfaceVariableResolver
- Throws:
QueryMetadataException
QueryResolverException
TeiidComponentException
-
getAutoIncrementKey
public static List<ElementSymbol> getAutoIncrementKey(Object metadataId, List<ElementSymbol> columns, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException
-
-