Class DropIndexCommand


  • public class DropIndexCommand
    extends Command
    This command-class represents the DROP INDEX DDL command.
    • Nested Class Summary

    • 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.
      • Fields inherited from class edu.caltech.nanodb.commands.Command

        out
    • 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
    • Constructor Detail

      • DropIndexCommand

        public DropIndexCommand​(java.lang.String indexName,
                                java.lang.String tableName,
                                boolean ifExists)
    • 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