Package org.h2.tools
Class DeleteDbFiles
- java.lang.Object
-
- org.h2.util.Tool
-
- org.h2.tools.DeleteDbFiles
-
public class DeleteDbFiles extends Tool
Deletes all files belonging to a database. The database must be closed before calling this tool.
-
-
Constructor Summary
Constructors Constructor Description DeleteDbFiles()Creates default instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidexecute(java.lang.String dir, java.lang.String db, boolean quiet)Deletes the database files.static voidmain(java.lang.String... args)Options are case sensitive.voidrunTool(java.lang.String... args)Run the tool with the given output stream and arguments.-
Methods inherited from class org.h2.util.Tool
getMainClassName, isOption, printNoDatabaseFilesFound, setOut, showUsage, showUsageAndThrowUnsupportedOption, throwUnsupportedOption
-
-
-
-
Method Detail
-
main
public static void main(java.lang.String... args) throws java.sql.SQLExceptionOptions are case sensitive.Supported options [-help] or [-?] Print the list of options [-dir <dir>] The directory (default: .) [-db <database>] The database name [-quiet] Do not print progress information - Parameters:
args- the command line arguments- Throws:
java.sql.SQLException- on failure
-
runTool
public void runTool(java.lang.String... args) throws java.sql.SQLExceptionDescription copied from class:ToolRun the tool with the given output stream and arguments.
-
execute
public static void execute(java.lang.String dir, java.lang.String db, boolean quiet)Deletes the database files.- Parameters:
dir- the directorydb- the database name (null for all databases)quiet- don't print progress information
-
-