public abstract class ProcedureContainerResolver extends Object implements CommandResolver
Constructor and Description |
---|
ProcedureContainerResolver() |
Modifier and Type | Method and Description |
---|---|
static void |
addChanging(TempMetadataStore discoveredMetadata,
GroupContext externalGroups,
List<ElementSymbol> elements) |
static GroupSymbol |
addScalarGroup(String name,
TempMetadataStore metadata,
GroupContext externalGroups,
List<? extends Expression> symbols) |
static GroupSymbol |
addScalarGroup(String name,
TempMetadataStore metadata,
GroupContext externalGroups,
List<? extends Expression> symbols,
boolean updatable) |
static GroupSymbol |
addScalarGroup(String name,
TempMetadataStore metadata,
GroupContext externalGroups,
List<? extends Expression> symbols,
boolean[] updatable) |
Command |
expandCommand(ProcedureContainer procCommand,
QueryMetadataInterface metadata,
AnalysisRecord analysis)
Expand a command by finding and attaching all subcommands to the command.
|
static void |
findChildCommandMetadata(Command currentCommand,
GroupSymbol container,
int type,
QueryMetadataInterface metadata,
boolean inferProcedureResultSetColumns)
Set the appropriate "external" metadata for the given command
|
protected abstract String |
getPlan(QueryMetadataInterface metadata,
GroupSymbol group)
For a given resolver, this returns the unparsed command.
|
static UpdateValidator.UpdateInfo |
getUpdateInfo(GroupSymbol group,
QueryMetadataInterface metadata) |
static UpdateValidator.UpdateInfo |
getUpdateInfo(GroupSymbol group,
QueryMetadataInterface metadata,
int type,
boolean validate) |
void |
resolveCommand(Command command,
TempMetadataAdapter metadata,
boolean resolveNullLiterals)
Resolve the command using the metadata.
|
protected void |
resolveGroup(TempMetadataAdapter metadata,
ProcedureContainer procCommand) |
abstract void |
resolveProceduralCommand(Command command,
TempMetadataAdapter metadata) |
static String |
validateUpdateInfo(GroupSymbol group,
int type,
UpdateValidator.UpdateInfo info) |
public abstract void resolveProceduralCommand(Command command, TempMetadataAdapter metadata) throws QueryMetadataException, QueryResolverException, TeiidComponentException
public Command expandCommand(ProcedureContainer procCommand, QueryMetadataInterface metadata, AnalysisRecord analysis) throws QueryMetadataException, QueryResolverException, TeiidComponentException
command
- The command to expanduseMetadataCommands
- True if resolver should use metadata commands to completely resolvemetadata
- Metadata accessanalysis
- The analysis record that will be filled in if doing annotation.QueryMetadataException
- If there is a metadata problemQueryResolverException
- If the query cannot be resolvedTeiidComponentException
- If there is an internal errorprotected abstract String getPlan(QueryMetadataInterface metadata, GroupSymbol group) throws TeiidComponentException, QueryMetadataException, QueryResolverException
metadata
- group
- TeiidComponentException
QueryMetadataException
QueryResolverException
public static void addChanging(TempMetadataStore discoveredMetadata, GroupContext externalGroups, List<ElementSymbol> elements)
public void resolveCommand(Command command, TempMetadataAdapter metadata, boolean resolveNullLiterals) throws QueryMetadataException, QueryResolverException, TeiidComponentException
CommandResolver
resolveCommand
in interface CommandResolver
command
- The command to resolvemetadata
- MetadataresolveNullLiterals
- true if the resolver should consider replacing null literals with more appropriate typesQueryMetadataException
- If there is a metadata problemQueryResolverException
- If the query cannot be resolvedTeiidComponentException
- If there is an internal errorCommandResolver.resolveCommand(org.teiid.query.sql.lang.Command, org.teiid.query.metadata.TempMetadataAdapter, boolean)
public static UpdateValidator.UpdateInfo getUpdateInfo(GroupSymbol group, QueryMetadataInterface metadata, int type, boolean validate) throws QueryMetadataException, TeiidComponentException, QueryResolverException
public static String validateUpdateInfo(GroupSymbol group, int type, UpdateValidator.UpdateInfo info)
public static UpdateValidator.UpdateInfo getUpdateInfo(GroupSymbol group, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException, QueryResolverException
protected void resolveGroup(TempMetadataAdapter metadata, ProcedureContainer procCommand) throws TeiidComponentException, QueryResolverException
metadata
- procCommand
- TeiidComponentException
QueryResolverException
public static GroupSymbol addScalarGroup(String name, TempMetadataStore metadata, GroupContext externalGroups, List<? extends Expression> symbols)
public static GroupSymbol addScalarGroup(String name, TempMetadataStore metadata, GroupContext externalGroups, List<? extends Expression> symbols, boolean updatable)
public static GroupSymbol addScalarGroup(String name, TempMetadataStore metadata, GroupContext externalGroups, List<? extends Expression> symbols, boolean[] updatable)
public static void findChildCommandMetadata(Command currentCommand, GroupSymbol container, int type, QueryMetadataInterface metadata, boolean inferProcedureResultSetColumns) throws QueryMetadataException, TeiidComponentException, QueryResolverException
inferProcedureResultSetColumns
- QueryResolverException
QueryMetadataException
TeiidComponentException
Copyright © 2018 JBoss by Red Hat. All rights reserved.