public class OConsoleDatabaseApp extends OrientConsole implements OCommandOutputListener, OProgressListener
OConsoleApplication.RESULT
Modifier and Type | Field and Description |
---|---|
protected ODatabaseDocumentInternal |
currentDatabase |
protected String |
currentDatabaseName |
protected ORecord |
currentRecord |
protected int |
currentRecordIdx |
protected Object |
currentResult |
protected List<OIdentifiable> |
currentResultSet |
protected OrientDB |
orientDB |
protected OURLConnection |
urlConnection |
args, commandBuffer, COMMENT_PREFIXS, err, exitCommands, helpCommands, in, interactiveMode, methods, ONLINE_HELP_EXT, ONLINE_HELP_URL, out, PARAM_DISABLE_HISTORY, properties, reader, wordSeparator
Constructor and Description |
---|
OConsoleDatabaseApp(String[] args) |
Modifier and Type | Method and Description |
---|---|
void |
alterClass(String iCommandText) |
void |
alterCluster(String iCommandText) |
void |
alterDatabase(String iCommandText) |
void |
alterProperty(String iCommandText) |
void |
alterSequence(String iCommandText) |
String |
ask(String iText) |
void |
backupDatabase(String iText) |
void |
begin() |
void |
browseClass(String iClassName) |
void |
browseCluster(String iClusterName) |
protected void |
checkCurrentObject()
Should be used only by console commands
|
void |
checkDatabase(String iOptions) |
protected void |
checkForDatabase()
Should be used only by console commands
|
protected void |
checkForRemoteServer()
Should be used only by console commands
|
void |
close()
Closes the console freeing all the used resources.
|
void |
clusterStatus() |
void |
commit() |
void |
compareDatabases(String iDb1URL,
String iDb2URL,
String iUserName,
String iUserPassword,
String autoDiscoveringMappingData) |
void |
config() |
void |
configGet(String iConfigName) |
void |
configSet(String iConfigName,
String iConfigValue) |
void |
connect(String iURL,
String iUserName,
String iUserPassword) |
void |
createClass(String iCommandText) |
void |
createCluster(String iCommandText) |
void |
createDatabase(String databaseURL,
String userName,
String userPassword,
String storageType,
String databaseType,
String options) |
void |
createEdge(String iCommandText) |
void |
createFunction(String iCommandText)
* Creates a function.
|
void |
createIndex(String iCommandText) |
void |
createLink(String iCommandText) |
void |
createProperty(String iCommandText) |
void |
createSequence(String iCommandText) |
void |
createUser(String iCommandText) |
void |
createVertex(String iCommandText) |
void |
current() |
void |
declareIntent(String iIntentName) |
void |
delete(String iCommandText) |
void |
dictionaryGet(String iKey) |
void |
dictionaryPut(String iKey,
String iRecordId) |
void |
dictionaryRemove(String iKey) |
void |
disconnect() |
void |
displayRecord(String iRecordNumber) |
void |
dropClass(String iCommandText) |
void |
dropCluster(String iClusterName) |
void |
dropDatabase(String storageType) |
void |
dropDatabase(String iDatabaseURL,
String iUserName,
String iUserPassword,
String storageType) |
void |
dropIndex(String iCommandText) |
void |
dropProperty(String iCommandText) |
void |
dropSequence(String iCommandText) |
void |
dropServerUser(String iServerUserName) |
void |
dropUser(String iCommandText) |
protected void |
dumpDistributedConfiguration(boolean iForce) |
protected void |
dumpResultSet(int limit) |
void |
eval(String iText) |
protected void |
executeServerSideScript(String iLanguage,
String iText) |
void |
explain(String iCommandText) |
void |
exportDatabase(String iText) |
void |
exportRecord(String iFormat,
String iOptions) |
void |
exportSchema(String iOutputFilePath) |
void |
findReferences(String iCommandText) |
void |
flushDatabase(String storageType) |
void |
freezeDatabase(String storageType) |
void |
gc() |
void |
get(String iPropertyName) |
protected String |
getContext() |
ODatabaseDocument |
getCurrentDatabase()
Should be used only by console commands
|
String |
getCurrentDatabaseName()
Should be used only by console commands
|
String |
getCurrentDatabaseUserName()
Should be used only by console commands
|
String |
getCurrentDatabaseUserPassword()
Should be used only by console commands
|
ORecord |
getCurrentRecord()
Should be used only by console commands
|
List<OIdentifiable> |
getCurrentResultSet()
Should be used only by console commands
|
protected ODocument |
getDistributedConfiguration() |
protected float |
getElapsedSecs(long start) |
int |
getMaxMultiValueEntries() |
protected String |
getPrompt() |
void |
grant(String iCommandText) |
void |
ha(String iCommandText) |
void |
importDatabase(String text) |
void |
info() |
void |
infoClass(String iClassName) |
void |
infoProperty(String iPropertyName) |
void |
insert(String iCommandText) |
protected boolean |
isCollectingCommands(String iLine) |
void |
js(String iText) |
void |
jss(String iText) |
void |
listClasses() |
void |
listClusters(String options) |
void |
listConnections() |
void |
listDatabases() |
void |
listIndexes() |
void |
listProperties() |
void |
listServers() |
void |
listServerUsers() |
void |
loadRecord(String iRecordId) |
void |
loadRecord(String iRecordId,
String iFetchPlan) |
void |
loadRecordInternal(String iRecordId,
String iFetchPlan)
Should be used only by console commands
|
void |
loadScript(String scriptPath) |
static void |
main(String[] args) |
void |
match(String iQueryText) |
void |
move(String iText) |
void |
moveVertex(String iCommandText) |
void |
next() |
protected void |
onBefore() |
void |
onBegin(Object iTask,
long iTotal,
Object metadata) |
void |
onCompletition(Object iTask,
boolean iSucceed) |
void |
onMessage(String iText) |
boolean |
onProgress(Object iTask,
long iCounter,
float iPercent) |
void |
optimizeDatabase(String iCommandText) |
protected Map<String,String> |
parseCommandOptions(String options) |
protected Map<String,List<String>> |
parseOptions(String iOptions) |
protected void |
parseResult() |
void |
prev() |
protected void |
printApplicationInfo() |
protected void |
printError(Exception e) |
void |
profiler(String iCommandName) |
void |
profileStorageOff() |
void |
profileStorageOn() |
void |
properties() |
void |
pwd() |
void |
rebuildIndex(String iCommandText) |
void |
releaseDatabase(String storageType) |
void |
reloadRecord(String iRecordId) |
void |
reloadRecord(String iRecordId,
String iFetchPlan) |
void |
reloadRecordInternal(String iRecordId,
String iFetchPlan)
Should be used only by console commands
|
void |
reloadSchema() |
void |
repairDatabase(String iOptions) |
protected void |
resetResultSet() |
void |
restoreDatabase(String text) |
protected static void |
restoreTerminal(boolean interactiveMode) |
void |
revoke(String iCommandText) |
void |
rollback() |
void |
script(String iText) |
void |
select(String iQueryText) |
void |
set(String iPropertyName,
String iPropertyValue) |
OConsoleDatabaseApp |
setCurrentDatabase(ODatabaseDocumentInternal iCurrentDatabase)
Pass an existent database instance to be used as current.
|
protected OIdentifiable |
setCurrentRecord(int iIndex) |
protected void |
setResultset(List<OIdentifiable> iResultset) |
void |
setServerUser(String iServerUserName,
String iServerUserPasswd,
String iPermissions) |
protected static boolean |
setTerminalToCBreak(boolean interactiveMode) |
void |
sleep(String iTime) |
protected static int |
stty(String args,
boolean interactiveMode)
Execute the stty command with the specified arguments against the current active terminal.
|
void |
transactional(String iCommandText) |
void |
traverse(String iQueryText) |
void |
truncateClass(String iCommandText) |
void |
truncateCluster(String iCommandText) |
void |
truncateRecord(String iCommandText) |
void |
update(String iCommandText) |
protected void |
updateDatabaseInfo() |
format, historyEnabled, onAfter, onException, onMessage
addCommand, error, execute, executeBatch, executeCommands, formatCommandSpecs, getClearName, getCommandLine, getConsoleMethods, getConsoleWidth, getCorrectMethodName, getMethod, getOnlineHelp, getVerboseLevel, help, isComment, isEchoEnabled, isInteractiveMode, isPropertyEnabled, message, run, setOutput, setReader, syntaxError
protected ODatabaseDocumentInternal currentDatabase
protected String currentDatabaseName
protected ORecord currentRecord
protected int currentRecordIdx
protected List<OIdentifiable> currentResultSet
protected Object currentResult
protected OURLConnection urlConnection
protected OrientDB orientDB
public OConsoleDatabaseApp(String[] args)
public static void main(String[] args)
protected static void restoreTerminal(boolean interactiveMode)
protected static boolean setTerminalToCBreak(boolean interactiveMode) throws IOException, InterruptedException
IOException
InterruptedException
protected static int stty(String args, boolean interactiveMode) throws IOException, InterruptedException
IOException
InterruptedException
public void connect(String iURL, String iUserName, String iUserPassword) throws IOException
IOException
public void disconnect()
public void createDatabase(String databaseURL, String userName, String userPassword, String storageType, String databaseType, String options) throws IOException
IOException
public void listDatabases() throws IOException
IOException
public void listConnections() throws IOException
IOException
public void reloadSchema() throws IOException
IOException
public void createCluster(String iCommandText)
public void dropCluster(String iClusterName)
public void alterCluster(String iCommandText)
public void begin() throws IOException
IOException
public void commit() throws IOException
IOException
public void rollback() throws IOException
IOException
public void truncateClass(String iCommandText)
public void truncateCluster(String iCommandText)
public void truncateRecord(String iCommandText)
public void loadRecord(String iRecordId)
public void reloadRecord(String iRecordId)
public void explain(String iCommandText)
public void transactional(String iCommandText)
public void insert(String iCommandText)
public void createVertex(String iCommandText)
public void createEdge(String iCommandText)
public void profileStorageOn()
public void profileStorageOff()
public void update(String iCommandText)
public void ha(String iCommandText)
public void moveVertex(String iCommandText)
public void optimizeDatabase(String iCommandText)
public void gc()
public void delete(String iCommandText)
public void grant(String iCommandText)
public void revoke(String iCommandText)
public void createLink(String iCommandText)
public void findReferences(String iCommandText)
public void alterDatabase(String iCommandText)
public void freezeDatabase(String storageType) throws IOException
IOException
public void releaseDatabase(String storageType) throws IOException
IOException
public void flushDatabase(String storageType) throws IOException
IOException
public void current()
public void next()
public void prev()
public void alterClass(String iCommandText)
public void createClass(String iCommandText)
public void createSequence(String iCommandText)
public void alterSequence(String iCommandText)
public void dropSequence(String iCommandText)
public void createUser(String iCommandText)
public void dropUser(String iCommandText)
public void alterProperty(String iCommandText)
public void createProperty(String iCommandText)
public void createFunction(String iCommandText)
iCommandText
- the command text to executepublic void traverse(String iQueryText)
public void select(String iQueryText)
public void match(String iQueryText)
public void move(String iText)
public void eval(String iText)
public void script(String iText)
public void js(String iText)
public void jss(String iText)
public void setServerUser(String iServerUserName, String iServerUserPasswd, String iPermissions)
public void dropServerUser(String iServerUserName)
public void listServerUsers()
public void createIndex(String iCommandText) throws IOException
IOException
public void dropDatabase(String storageType) throws IOException
IOException
public void dropDatabase(String iDatabaseURL, String iUserName, String iUserPassword, String storageType) throws IOException
IOException
public void dropIndex(String iCommandText) throws IOException
IOException
public void rebuildIndex(String iCommandText) throws IOException
IOException
public void dropClass(String iCommandText) throws IOException
IOException
public void dropProperty(String iCommandText) throws IOException
IOException
public void browseClass(String iClassName)
public void browseCluster(String iClusterName)
public void displayRecord(String iRecordNumber)
public void info()
public void listProperties()
public void infoClass(String iClassName)
public void infoProperty(String iPropertyName)
public void listIndexes()
public void listClusters(String options)
public void listClasses()
public void listServers()
public void dictionaryGet(String iKey)
public void dictionaryRemove(String iKey)
public void clusterStatus() throws IOException
IOException
public void checkDatabase(String iOptions) throws IOException
IOException
public void repairDatabase(String iOptions) throws IOException
IOException
public void compareDatabases(String iDb1URL, String iDb2URL, String iUserName, String iUserPassword, String autoDiscoveringMappingData) throws IOException
IOException
public void loadScript(String scriptPath) throws IOException
IOException
public void importDatabase(String text) throws IOException
IOException
public void backupDatabase(String iText) throws IOException
IOException
public void restoreDatabase(String text) throws IOException
IOException
public void exportDatabase(String iText) throws IOException
IOException
public void exportSchema(String iOutputFilePath) throws IOException
IOException
public void exportRecord(String iFormat, String iOptions) throws IOException
IOException
public void properties()
public void get(String iPropertyName)
public void declareIntent(String iIntentName)
public void profiler(String iCommandName)
public void configGet(String iConfigName) throws IOException
IOException
public void sleep(String iTime)
public void configSet(String iConfigName, String iConfigValue) throws IOException
IOException
public void config() throws IOException
IOException
public ODatabaseDocument getCurrentDatabase()
public OConsoleDatabaseApp setCurrentDatabase(ODatabaseDocumentInternal iCurrentDatabase)
public String getCurrentDatabaseName()
public String getCurrentDatabaseUserName()
public String getCurrentDatabaseUserPassword()
public ORecord getCurrentRecord()
public List<OIdentifiable> getCurrentResultSet()
public void loadRecordInternal(String iRecordId, String iFetchPlan)
public void reloadRecordInternal(String iRecordId, String iFetchPlan)
protected void checkForRemoteServer()
protected void checkForDatabase()
protected void checkCurrentObject()
public void onMessage(String iText)
onMessage
in interface OCommandOutputListener
public void onBegin(Object iTask, long iTotal, Object metadata)
onBegin
in interface OProgressListener
public boolean onProgress(Object iTask, long iCounter, float iPercent)
onProgress
in interface OProgressListener
public void pwd()
public void onCompletition(Object iTask, boolean iSucceed)
onCompletition
in interface OProgressListener
public void close()
protected void dumpDistributedConfiguration(boolean iForce)
protected ODocument getDistributedConfiguration()
protected boolean isCollectingCommands(String iLine)
isCollectingCommands
in class OConsoleApplication
protected void onBefore()
onBefore
in class OrientConsole
protected OIdentifiable setCurrentRecord(int iIndex)
protected void printApplicationInfo()
printApplicationInfo
in class OrientConsole
protected void dumpResultSet(int limit)
protected float getElapsedSecs(long start)
protected void printError(Exception e)
protected void updateDatabaseInfo()
protected String getContext()
getContext
in class OConsoleApplication
protected String getPrompt()
getPrompt
in class OConsoleApplication
protected void parseResult()
protected void setResultset(List<OIdentifiable> iResultset)
protected void resetResultSet()
public int getMaxMultiValueEntries()
Copyright © 2009–2020 OrientDB. All rights reserved.