Package org.basex.core.cmd
Class AlterDB
java.lang.Object
org.basex.core.jobs.Job
org.basex.core.Command
org.basex.core.cmd.ACreate
org.basex.core.cmd.AlterDB
Evaluates the 'alter database' command and renames a database.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocks()Adds the strings (databases, special identifiers) for which locks need to be acquired.static booleanalter(String source, String target, StaticOptions sopts) Renames the specified database.voidbuild(CmdBuilder cb) Builds a string representation from the command.booleanCloses an open data reference and returnstrueif this command will change theContext.data()reference.protected booleanrun()Executes the command and serializes the result (internal call).Methods inherited from class org.basex.core.cmd.ACreate
stoppable, supportsProgMethods inherited from class org.basex.core.Command
addLocks, baseURI, baseURI, close, error, exception, execute, execute, getOption, getOption, info, info, init, maxResults, result, run, run, setInput, setInput, toString, toString, updated, updating
-
Constructor Details
-
AlterDB
Default constructor.- Parameters:
db- databasename- new name
-
-
Method Details
-
run
protected boolean run()Description copied from class:CommandExecutes the command and serializes the result (internal call). -
addLocks
public void addLocks()Description copied from class:JobAdds the strings (databases, special identifiers) for which locks need to be acquired. -
alter
Renames the specified database.- Parameters:
source- name of the existing databasetarget- new database namesopts- static options- Returns:
- success flag
-
newData
Description copied from class:CommandCloses an open data reference and returnstrueif this command will change theContext.data()reference. This method is only required by the GUI. -
build
Description copied from class:CommandBuilds a string representation from the command. This string must be correctly built, as commands are sent to the server as strings.
-