summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/jsondb-client/client.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/jsondb-client/client.cpp b/tools/jsondb-client/client.cpp
index 70197e02..c45616b9 100644
--- a/tools/jsondb-client/client.cpp
+++ b/tools/jsondb-client/client.cpp
@@ -321,7 +321,8 @@ void Client::usage()
{
std::stringstream out;
out << "Valid commands:" << std::endl
- << std::endl
+ << " connect" << std::endl
+ << " disconnect" << std::endl
<< "Direct database commands - these take an explict object" << std::endl
<< " create [partition:<name>] OBJECT" << std::endl
<< " update [partition:<name>] OBJECT" << std::endl
@@ -490,6 +491,10 @@ bool Client::processCommand(const QString &command)
qDebug() << "Sending changesSince: " << stateNumber << "types: " << types;
mRequests << mConnection->changesSince(stateNumber, types, partition);
+ } else if (cmd == "connect") {
+ mConnection->connectToServer();
+ } else if (cmd == "disconnect") {
+ mConnection->disconnectFromServer();
} else if (!cmd.isEmpty()) {
InputThread::print("Unrecognized command: " % cmd);
usage();