Package edu.caltech.nanodb.commands
This package contains the classes that represent the commands that the NanoSQL
database recognizes. All of the commands are represented as subclasses of the
Command
abstract base-class. Commands are
grouped into the following categories:
Data Definition Language (DDL) Commands
These commands manipulate the contents of the data-dictionary. The supported commands are as follows:- CREATE TABLE -
CreateTableCommand
class - DROP TABLE -
DropTableCommand
class
Data Manipulation Language (DML) Commands
These commands retrieve and modify the database tables themselves. Note that these commands all derive from theQueryCommand
abstract class. The supported commands are as follows:
- DELETE ... -
DeleteCommand
class - INSERT ... -
InsertCommand
class - SELECT ... -
SelectCommand
class - UPDATE ... -
UpdateCommand
class
Transaction-Demarcation Commands
These commands provide control over when a transaction is started or ended:- BEGIN [WORK] | START TRANSACTION -
BeginTransactionCommand
class - COMMIT [WORK] -
CommitTransactionCommand
class - ROLLBACK [WORK] -
RollbackTransactionCommand
class
Utility Commands
These commands perform various utility operations:- ANALYZE ... -
AnalyzeCommand
class - EXPLAIN ... -
ExplainCommand
class - EXIT | QUIT -
ExitCommand
class
-
Class Summary Class Description AnalyzeCommand This Command class represents the ANALYZE SQL command, which analyzes a table's internal data and updates its cached statistics to be as up-to-date as possible.BeginTransactionCommand This class represents a command that starts a transaction, such as BEGIN, BEGIN WORK, or START TRANSACTION.Command Abstract base-class for all commands that NanoDB supports.CommandProperties This class holds properties that might contain additional details for a command.CommitTransactionCommand This class represents a command that commits a transaction, such as COMMIT or COMMIT WORK.ConstraintDecl Constraints may be specified at the table level, or they may be specified on individual columns.CrashCommand This command "crashes" the database by shutting it down immediately without any proper cleanup or flushing of caches.CreateIndexCommand This command-class represents the CREATE INDEX DDL command.CreateTableCommand This command handles the CREATE TABLE DDL operation.CreateViewCommand This command-class represents the CREATE VIEW DDL command.DDLUtils This helper class provides some useful functions for constructing keys and indexes and other details for tables that are being initialized.DeleteCommand This command object represents a top-level DELETE command issued against the database.DeleteCommand.TupleRemover An implementation of the tuple processor interface used by theDeleteCommand
to delete each tuple.DropIndexCommand This command-class represents the DROP INDEX DDL command.DropTableCommand This Command class represents the DROP TABLE SQL command.DumpCommand An abstract base-class that holds the common implementation of the various kinds of dump commands.DumpCommand.TupleExporter A tuple processor implementation used to dump each tuple.DumpIndexCommand This command object represents a DUMP INDEX command issued against the database.DumpTableCommand This command object represents a DUMP TABLE command issued against the database.ExitCommand This Command class represents the EXIT or QUIT SQL commands.ExplainCommand This Command class represents the EXPLAIN SQL command, which prints out details of how SQL DML statements will be evaluated.FlushCommand This command flushes all unwritten data from the buffer manager to disk.InsertCommand This command object represents a top-level INSERT command issued against the database.InsertCommand.TupleInserter An implementation of the tuple processor interface used by theInsertCommand
to insert tuples into a table, when the command is of the form INSERT ...OptimizeCommand This Command class represents the OPTIMIZE SQL command, which optimizes a table's representation (along with any indexes) to improve access performance and space utilization.QueryCommand This class represents all SQL query commands, including SELECT, INSERT, UPDATE, and DELETE.RollbackTransactionCommand This class represents a command that rolls back a transaction, such as ROLLBACK or ROLLBACK WORK.SelectCommand This command object represents a top-level SELECT command issued against the database.SetPropertyCommand Implements the "SET VARIABLE ..." command.ShowPropertiesCommand Implements the "SHOW VARIABLES" command.ShowSystemStatsCommand Implements the "SHOW [system] STATS" command.ShowTablesCommand Implements the "SHOW TABLES" command.ShowTableStatsCommand Implements the "SHOW TABLE t STATS" command.TableColumnDecl This class represents a single column declaration within a CREATE TABLE command.UpdateCommand This command object represents a top-level UPDATE command issued against the database.UpdateCommand.TupleUpdater An implementation of the tuple processor interface used by theUpdateCommand
to update each tuple.UpdateValue This class represents a single column-name/expression pair in an UPDATE statement's SET clause.VerifyCommand This Command class represents the VERIFY SQL command, which verifies a table's representation (along with any indexes) to ensure that all structural details are valid. -
Enum Summary Enum Description Command.Type Commands are either Data-Definition Language (DDL), Data-Manipulation Language (DML), or utility commands.QueryCommand.Type Typesafe enumeration of query-command types. -
Exception Summary Exception Description ExecutionException This exception is thrown when a fatal error occurs during command execution.