Package edu.caltech.nanodb.commands
Class DropIndexCommand
- java.lang.Object
-
- edu.caltech.nanodb.commands.Command
-
- edu.caltech.nanodb.commands.DropIndexCommand
-
public class DropIndexCommand extends Command
This command-class represents the DROP INDEX DDL command.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.caltech.nanodb.commands.Command
Command.Type
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
ifExists
This flag controls whether the drop-index command will fail if the index already doesn't exist when the removal is attempted.private java.lang.String
indexName
The name of the index to drop.private java.lang.String
tableName
The name of the table that the index is built against.
-
Constructor Summary
Constructors Constructor Description DropIndexCommand(java.lang.String indexName, java.lang.String tableName, boolean ifExists)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(NanoDBServer server)
Actually performs the command.boolean
getIfExists()
Returns the value of the "if exists" flag; true indicates that it is not an error if the index doesn't exist when this command is issued.java.lang.String
getIndexName()
Get the name of the index to be dropped.java.lang.String
getTableName()
Get the name of the table containing the index to be dropped.-
Methods inherited from class edu.caltech.nanodb.commands.Command
getCommandType
-
-
-
-
Field Detail
-
indexName
private java.lang.String indexName
The name of the index to drop.
-
tableName
private java.lang.String tableName
The name of the table that the index is built against.
-
ifExists
private boolean ifExists
This flag controls whether the drop-index command will fail if the index already doesn't exist when the removal is attempted.
-
-
Method Detail
-
getTableName
public java.lang.String getTableName()
Get the name of the table containing the index to be dropped.- Returns:
- the name of the table containing the index to drop
-
getIndexName
public java.lang.String getIndexName()
Get the name of the index to be dropped.- Returns:
- the name of the index to drop
-
getIfExists
public boolean getIfExists()
Returns the value of the "if exists" flag; true indicates that it is not an error if the index doesn't exist when this command is issued.- Returns:
- the value of the "if exists" flag
-
execute
public void execute(NanoDBServer server) throws ExecutionException
Description copied from class:Command
Actually performs the command.- Specified by:
execute
in classCommand
- Throws:
ExecutionException
- if an issue occurs during command execution
-
-