*/
public void executeConstantAction( Activation activation )
throws StandardException
{
TableDescriptor td;
ViewDescriptor vd;
LanguageConnectionContext lcc = activation.getLanguageConnectionContext();
DataDictionary dd = lcc.getDataDictionary();
DependencyManager dm = dd.getDependencyManager();
TransactionController tc = lcc.getTransactionExecute();
/*
** Inform the data dictionary that we are about to write to it.
** There are several calls to data dictionary "get" methods here
** that might be done in "read" mode in the data dictionary, but
** it seemed safer to do this whole operation in "write" mode.
**
** We tell the data dictionary we're done writing at the end of
** the transaction.
*/
dd.startWriting(lcc);
/* Get the table descriptor. We're responsible for raising
* the error if it isn't found
*/
td = dd.getTableDescriptor(tableName, sd);
if (td == null)
{
throw StandardException.newException(SQLState.LANG_TABLE_NOT_FOUND_DURING_EXECUTION, fullTableName);
}
/* Verify that TableDescriptor represents a view */
if (td.getTableType() != TableDescriptor.VIEW_TYPE)
{
throw StandardException.newException(SQLState.LANG_DROP_VIEW_ON_NON_VIEW, fullTableName);
}
vd = dd.getViewDescriptor(td);
vd.dropViewWork(dd, dm, lcc, tc, sd, td, false);
}