1 21 22 package org.apache.derby.impl.sql.compile; 23 24 import org.apache.derby.iapi.services.context.ContextManager; 25 26 import org.apache.derby.iapi.sql.execute.ConstantAction; 27 28 import org.apache.derby.impl.sql.compile.ActivationClassBuilder; 29 import org.apache.derby.impl.sql.execute.BaseActivation; 30 import org.apache.derby.iapi.sql.ResultSet; 31 32 import org.apache.derby.iapi.error.StandardException; 33 import org.apache.derby.iapi.sql.compile.CompilerContext; 34 import org.apache.derby.iapi.sql.dictionary.DataDictionary; 35 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor; 36 import org.apache.derby.iapi.sql.dictionary.TableDescriptor; 37 38 import org.apache.derby.iapi.services.sanity.SanityManager; 39 40 46 47 public class DropViewNode extends DDLStatementNode 48 { 49 50 56 57 public void init(Object dropObjectName) 58 throws StandardException 59 { 60 initAndCheck(dropObjectName); 61 } 62 63 public String statementToString() 64 { 65 return "DROP VIEW"; 66 } 67 68 75 76 public QueryTreeNode bind() throws StandardException 77 { 78 DataDictionary dd = getDataDictionary(); 79 CompilerContext cc = getCompilerContext(); 80 81 TableDescriptor td = dd.getTableDescriptor(getRelativeName(), 82 getSchemaDescriptor()); 83 84 89 if (td != null) 90 { 91 cc.createDependency(td); 92 } 93 94 return this; 95 } 96 97 98 100 101 106 public ConstantAction makeConstantAction() throws StandardException 107 { 108 return getGenericConstantActionFactory().getDropViewConstantAction( getFullName(), 109 getRelativeName(), 110 getSchemaDescriptor()); 111 } 112 } 113 | Popular Tags |