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
-
public final class AlterDB extends ACreate
Evaluates the 'alter database' command and renames a database.- Author:
- BaseX Team 2005-24, BSD License, Christian Gruen
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLocks()
Collects lock strings (databases, special identifiers) when registering a query.static boolean
alter(String source, String target, StaticOptions sopts)
Renames the specified database.void
build(CmdBuilder cb)
Builds a string representation from the command.boolean
newData(Context ctx)
Closes an open data reference and returnstrue
if this command will change theContext.data()
reference.protected boolean
run()
Executes the command and serializes the result (internal call).-
Methods inherited from class org.basex.core.cmd.ACreate
stoppable, supportsProg
-
Methods inherited from class org.basex.core.Command
addLocks, baseURI, baseURI, close, error, execute, execute, getOption, getOption, info, info, init, run, run, setInput, setInput, toString, toString, updated, updating
-
-
-
-
Method Detail
-
run
protected boolean run()
Description copied from class:Command
Executes the command and serializes the result (internal call).
-
addLocks
public void addLocks()
Description copied from class:Job
Collects lock strings (databases, special identifiers) when registering a query.
-
alter
public static boolean alter(String source, String target, StaticOptions sopts)
Renames the specified database.- Parameters:
source
- name of the existing databasetarget
- new database namesopts
- static options- Returns:
- success flag
-
newData
public boolean newData(Context ctx)
Description copied from class:Command
Closes an open data reference and returnstrue
if this command will change theContext.data()
reference. This method is only required by the GUI.
-
build
public void build(CmdBuilder cb)
Description copied from class:Command
Builds a string representation from the command. This string must be correctly built, as commands are sent to the server as strings.
-
-