@Component @UserDocumentation(title="Commands for Database Management", description="These commands provide CRUD for databases") public class LensDatabaseCommands extends LensCRUDCommand
DATE_FMT, DATE_PARSER| Constructor and Description |
|---|
LensDatabaseCommands() |
| Modifier and Type | Method and Description |
|---|---|
String |
createDatabase(String database,
boolean ignoreIfExists)
Creates the database.
|
APIResult |
doUpdate(String name,
String path) |
String |
dropDatabase(String database,
boolean cascade)
Drop database.
|
List<String> |
getAll() |
String |
showAllDatabases()
Show all databases.
|
String |
switchDatabase(String database)
Switch database.
|
create, describe, drop, getSingleObjectName, showAll, updateafterReturningInvocation, afterThrowingInvocation, beforeInvocation, formatDate, formatJson, getClient, getClientWrapper, getOrDefaultQueryHandleString, getValidPath, removePrefixBeforeURI, setClient@CliCommand(value="show databases",
help="displays list of all databases")
public String showAllDatabases()
@CliCommand(value="use",
help="change to new database")
public String switchDatabase(@CliOption(key={"","db"},mandatory=true,help="")
String database)
database - the database@CliCommand(value="create database",
help="create a database with specified name. if is true, create will not be tried if already exists. Default is false")
public String createDatabase(@CliOption(key={"","db"},mandatory=true,help="")
String database,
@CliOption(key="ignoreIfExists",mandatory=false,unspecifiedDefaultValue="false",help="")
boolean ignoreIfExists)
database - the databaseignoreIfExists - the ignore@CliCommand(value="drop database",
help="drop a database with specified name")
public String dropDatabase(@CliOption(key={"","db"},mandatory=true,help="")
String database,
@CliOption(key="cascade",specifiedDefaultValue="true",unspecifiedDefaultValue="false")
boolean cascade)
database - the databasepublic List<String> getAll()
getAll in class LensCRUDCommandpublic APIResult doUpdate(String name, String path)
doUpdate in class LensCRUDCommandCopyright © 2014–2016 Apache Software Foundation. All rights reserved.