Package org.basex.core.cmd
Class Close
java.lang.Object
org.basex.core.jobs.Job
org.basex.core.Command
org.basex.core.cmd.Close
Evaluates the 'close' command and closes the current 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 booleanCloses a currently opened database.static voidCloses the specified database.protected booleanrun()Executes the command and serializes the result (internal call).Methods inherited from class org.basex.core.Command
addLocks, baseURI, baseURI, build, close, error, exception, execute, execute, getOption, getOption, info, info, init, maxResults, newData, result, run, run, setInput, setInput, stoppable, supportsProg, toString, toString, updated, updating
-
Constructor Details
-
Close
public Close()Default constructor.
-
-
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. -
close
Closes the specified database.- Parameters:
data- data referencectx- database context
-
close
Closes a currently opened database.- Parameters:
ctx- database context- Returns:
trueif no database was opened, or if database was closed
-