Skip to content

Commit

Permalink
slightly improve mock message output
Browse files Browse the repository at this point in the history
  • Loading branch information
t-horikawa committed Jan 29, 2025
1 parent f171608 commit f2cb269
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mock/tateyama/service/mock_request_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ void mock_service::execute_prepared_statement(request* req, response* res) {
jogasaki::proto::sql::request::Request request_message{};
request_message.ParseFromString(std::string(req->payload()));
auto& parameters = request_message.execute_prepared_statement().parameters();
bool need_line_break{};
for (auto&& e: parameters) {
if (need_line_break) {
std::cout << "========" << std::endl;
}
auto value_case = e.value_case();
if (value_case == jogasaki::proto::sql::request::Parameter::ValueCase::kBlob) {
auto value = e.blob();
Expand All @@ -94,6 +98,7 @@ void mock_service::execute_prepared_statement(request* req, response* res) {
auto value = e.clob();
dump_lob(req, value.channel_name(), value.data_case() == jogasaki::proto::sql::common::Clob::DataCase::kLocalPath ? value.local_path() : "");
}
need_line_break = true;
}

jogasaki::proto::sql::response::Response response_message{};
Expand Down

0 comments on commit f2cb269

Please sign in to comment.