Skip to content

Commit aeb3f20

Browse files
committed
Merge branch 'feature/newConsensus' of gitlab.peersafe.cn:chainsql/chainsqld into feature/newConsensus
2 parents 3f698b3 + f404534 commit aeb3f20

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/peersafe/app/sql/STTx2SQL.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,8 +2353,8 @@ class BuildSqlite : public BuildSQL {
23532353

23542354
namespace helper {
23552355

2356-
std::pair<int, std::string> ParseTxJson(const Json::Value& tx_json, BuildSQL &buildsql) {
2357-
std::string error = "Unkown Error when parse json";
2356+
std::pair<int, std::string> ParseQueryJson(const Json::Value& tx_json, BuildSQL &buildsql) {
2357+
std::string error = "Unknown Error when parse json";
23582358
int code = 0;
23592359
do {
23602360
Json::Value obj_tables = tx_json["Tables"];
@@ -2451,13 +2451,14 @@ namespace helper {
24512451
code = -3;
24522452
break;
24532453
}
2454-
//check blank space
2454+
////check blank space
2455+
//auto field_name_str = fieldname.asString();
2456+
//if (field_name_str.find(' ') != std::string::npos){
2457+
// error = (boost::format("Field [%s] contains blank space.")
2458+
// % field_name_str).str();
2459+
// break;
2460+
//}
24552461
auto field_name_str = fieldname.asString();
2456-
if (field_name_str.find(' ') != std::string::npos){
2457-
error = (boost::format("Field [%s] contains blank space.")
2458-
% field_name_str).str();
2459-
break;
2460-
}
24612462
BuildField field(field_name_str);
24622463
buildsql.AddField(field);
24632464
}
@@ -2717,7 +2718,7 @@ namespace helper {
27172718

27182719
Json::Value query_directly(const Json::Value& tx_json, DatabaseCon* conn, BuildSQL* buildsql, int selectLimit) {
27192720
Json::Value obj;
2720-
std::pair<int, std::string> result = ParseTxJson(tx_json, *buildsql);
2721+
std::pair<int, std::string> result = ParseQueryJson(tx_json, *buildsql);
27212722
if (result.first != 0) {
27222723
return RPC::make_error(rpcJSON_PARSED_ERR, result.second);
27232724
}
@@ -2742,7 +2743,7 @@ namespace helper {
27422743
}
27432744
std::pair<std::vector<std::vector<Json::Value>>, std::string> query_directly2d(const Json::Value& tx_json, DatabaseCon* conn, BuildSQL* buildsql, int selectLimit) {
27442745
std::vector<std::vector<Json::Value>> obj;
2745-
std::pair<int, std::string> result = ParseTxJson(tx_json, *buildsql);
2746+
std::pair<int, std::string> result = ParseQueryJson(tx_json, *buildsql);
27462747
if (result.first != 0) {
27472748
return std::make_pair(obj,result.second);
27482749
}

0 commit comments

Comments
 (0)