Skip to content

Commit

Permalink
Common responce
Browse files Browse the repository at this point in the history
  • Loading branch information
topilski committed Jul 28, 2016
1 parent 016de17 commit 8e4a2a4
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/core/leveldb/db_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ common::Error set(CommandHandler* handler, int argc, char** argv, FastoObject* o

common::Error er = level->set(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, level->delimiter(), level->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -397,7 +397,7 @@ common::Error del(CommandHandler* handler, int argc, char** argv, FastoObject* o

common::Error er = level->del(argv[0]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, level->delimiter(), level->nsSeparator());
out->addChildren(child);
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/lmdb/db_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ common::Error set(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* mdb = static_cast<DBConnection*>(handler);
common::Error er = mdb->set(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mdb->delimiter(), mdb->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -483,7 +483,7 @@ common::Error del(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* mdb = static_cast<DBConnection*>(handler);
common::Error er = mdb->del(argv[0]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mdb->delimiter(), mdb->nsSeparator());
out->addChildren(child);
}
Expand Down
18 changes: 9 additions & 9 deletions src/core/memcached/db_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ common::Error set(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->set(argv[0], argv[3], common::ConvertFromString<time_t>(argv[1]), common::ConvertFromString<uint32_t>(argv[2]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -509,7 +509,7 @@ common::Error add(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->add(argv[0], argv[3], common::ConvertFromString<time_t>(argv[1]), common::ConvertFromString<uint32_t>(argv[2]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -523,7 +523,7 @@ common::Error replace(CommandHandler* handler, int argc, char** argv, FastoObjec
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->replace(argv[0], argv[3], common::ConvertFromString<time_t>(argv[1]), common::ConvertFromString<uint32_t>(argv[2]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -537,7 +537,7 @@ common::Error append(CommandHandler* handler, int argc, char** argv, FastoObject
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->append(argv[0], argv[3], common::ConvertFromString<time_t>(argv[1]), common::ConvertFromString<uint32_t>(argv[2]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -551,7 +551,7 @@ common::Error prepend(CommandHandler* handler, int argc, char** argv, FastoObjec
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->prepend(argv[0], argv[3], common::ConvertFromString<time_t>(argv[1]), common::ConvertFromString<uint32_t>(argv[2]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -565,7 +565,7 @@ common::Error incr(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->incr(argv[0], common::ConvertFromString<uint64_t>(argv[1]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -579,7 +579,7 @@ common::Error decr(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->decr(argv[0], common::ConvertFromString<uint64_t>(argv[1]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -591,7 +591,7 @@ common::Error del(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->del(argv[0], argc == 2 ? atoll(argv[1]) : 0);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand All @@ -603,7 +603,7 @@ common::Error flush_all(CommandHandler* handler, int argc, char** argv, FastoObj
DBConnection* mem = static_cast<DBConnection*>(handler);
common::Error er = mem->flush_all(argc == 1 ? common::ConvertFromString<time_t>(argv[0]) : 0);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, mem->delimiter(), mem->nsSeparator());
out->addChildren(child);
}
Expand Down
6 changes: 3 additions & 3 deletions src/core/rocksdb/db_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ common::Error set(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* rocks = static_cast<DBConnection*>(handler);
common::Error er = rocks->set(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, rocks->delimiter(), rocks->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -444,7 +444,7 @@ common::Error merge(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* rocks = static_cast<DBConnection*>(handler);
common::Error er = rocks->merge(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, rocks->delimiter(), rocks->nsSeparator());
out->addChildren(child);
}
Expand All @@ -458,7 +458,7 @@ common::Error del(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* rocks = static_cast<DBConnection*>(handler);
common::Error er = rocks->del(argv[0]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, rocks->delimiter(), rocks->nsSeparator());
out->addChildren(child);
}
Expand Down
26 changes: 13 additions & 13 deletions src/core/ssdb/db_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ common::Error set(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->set(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand All @@ -949,7 +949,7 @@ common::Error setx(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->setx(argv[0], argv[1], common::ConvertFromString<int>(argv[2]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand All @@ -963,7 +963,7 @@ common::Error del(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->del(argv[0]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -1074,7 +1074,7 @@ common::Error multi_set(CommandHandler* handler, int argc, char** argv, FastoObj

common::Error er = ssdb->multi_set(keysset);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand All @@ -1091,7 +1091,7 @@ common::Error multi_del(CommandHandler* handler, int argc, char** argv, FastoObj

common::Error er = ssdb->multi_del(keysget);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -1139,7 +1139,7 @@ common::Error hset(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->hset(argv[0], argv[1], argv[2]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand All @@ -1153,7 +1153,7 @@ common::Error hdel(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->hdel(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -1294,7 +1294,7 @@ common::Error multi_hset(CommandHandler* handler, int argc, char** argv, FastoOb

common::Error er = ssdb->multi_hset(argv[0], keys);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -1323,7 +1323,7 @@ common::Error zset(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->zset(argv[0], argv[1], atoll(argv[2]));
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand All @@ -1337,7 +1337,7 @@ common::Error zdel(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->zdel(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -1551,7 +1551,7 @@ common::Error multi_zset(CommandHandler* handler, int argc, char** argv, FastoOb

common::Error er = ssdb->multi_zset(argv[0], keysget);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand All @@ -1568,7 +1568,7 @@ common::Error multi_zdel(CommandHandler* handler, int argc, char** argv, FastoOb

common::Error er = ssdb->multi_zdel(argv[0], keysget);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand All @@ -1582,7 +1582,7 @@ common::Error qpush(CommandHandler* handler, int argc, char** argv, FastoObject*
DBConnection* ssdb = static_cast<DBConnection*>(handler);
common::Error er = ssdb->qpush(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, ssdb->delimiter(), ssdb->nsSeparator());
out->addChildren(child);
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/unqlite/db_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ common::Error set(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* unq = static_cast<DBConnection*>(handler);
common::Error er = unq->set(argv[0], argv[1]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("STORED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, unq->delimiter(), unq->nsSeparator());
out->addChildren(child);
}
Expand Down Expand Up @@ -409,7 +409,7 @@ common::Error del(CommandHandler* handler, int argc, char** argv, FastoObject* o
DBConnection* unq = static_cast<DBConnection*>(handler);
common::Error er = unq->del(argv[0]);
if (!er) {
common::StringValue* val = common::Value::createStringValue("DELETED");
common::StringValue* val = common::Value::createStringValue("OK");
FastoObject* child = new FastoObject(out, val, unq->delimiter(), unq->nsSeparator());
out->addChildren(child);
}
Expand Down

0 comments on commit 8e4a2a4

Please sign in to comment.