protected override SqlStatement PrepareStatement(IRequest context)
{
ObjectName tableName = null;
if (Target == ShowTarget.Table &&
TableName != null) {
tableName = context.Access().ResolveTableName(TableName);
}
if (Target == ShowTarget.Schema)
return ShowSchema();
if (Target == ShowTarget.SchemaTables)
return ShowSchemaTables(context.Query.CurrentSchema());
if (Target == ShowTarget.Table)
return ShowTable(tableName);
if (Target == ShowTarget.Product)
return ShowProduct();
throw new StatementException(String.Format("The SHOW target {0} is not supported.", Target));
}