Top Description Inners Fields Constructors Methods
org.h2.command.ddl

public Class DropTable

extends DefineCommand
Class Inheritance
Imports
java.util.ArrayList, .HashSet, .List, java.util.concurrent.CopyOnWriteArrayList, org.h2.api.ErrorCode, org.h2.command.CommandInterface, org.h2.constraint.Constraint, .ConstraintActionType, org.h2.engine.Database, .Right, .SessionLocal, org.h2.message.DbException, org.h2.schema.Schema, org.h2.table.MaterializedView, .Table, .TableView, org.h2.util.Utils

This class represents the statement DROP TABLE

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private ConstraintActionType
private boolean
private final ArrayList<DropTable.SchemaAndTable>
Inherited from org.h2.command.ddl.DefineCommand:
transactional

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addTable(Schema
the schema
schema
,
String
the table name
tableName
)

Add a table to drop.

private void
public int
getType()

Implements abstract org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

private boolean
public void
public void
setIfExists(boolean b)

public long
update()

Overrides org.h2.command.Prepared.update.

Execute the statement.

Inherited from org.h2.command.ddl.DefineCommand:
isReadOnlyisRetryableisTransactionalqueryMetasetTransactional

Field Detail

dropActionback to summary
private ConstraintActionType dropAction
ifExistsback to summary
private boolean ifExists
tablesback to summary
private final ArrayList<DropTable.SchemaAndTable> tables

Constructor Detail

DropTableback to summary
public DropTable(SessionLocal session)

Method Detail

addTableback to summary
public void addTable(Schema schema, String tableName)

Add a table to drop.

Parameters
schema:Schema

the schema

tableName:String

the table name

executeDropback to summary
private void executeDrop()
getTypeback to summary
public int getType()

Implements abstract org.h2.command.Prepared.getType.

Doc from org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

Returns:int

the statement type

Annotations
@Override
prepareDropback to summary
private boolean prepareDrop()
setDropActionback to summary
public void setDropAction(ConstraintActionType dropAction)
setIfExistsback to summary
public void setIfExists(boolean b)
updateback to summary
public long update()

Overrides org.h2.command.Prepared.update.

Doc from org.h2.command.Prepared.update.

Execute the statement.

Returns:long

the update count

Annotations
@Override
org.h2.command.ddl back to summary

private final Class DropTable.SchemaAndTable

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final Schema
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv
SchemaAndTable(Schema schema, String tableName)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

schemaback to summary
pack-priv final Schema schema
tableNameback to summary
pack-priv final String tableName

Constructor Detail

SchemaAndTableback to summary
pack-priv SchemaAndTable(Schema schema, String tableName)