minor tweaks
This commit is contained in:
@@ -385,8 +385,7 @@ void HttpServer::DoHandleRun(const httplib::Request &req,
|
|||||||
// If there's more than one statement, run all but the last.
|
// If there's more than one statement, run all but the last.
|
||||||
if (statement_count > 1) {
|
if (statement_count > 1) {
|
||||||
for (auto i = 0; i < statement_count - 1; ++i) {
|
for (auto i = 0; i < statement_count - 1; ++i) {
|
||||||
auto &statement = statements[i];
|
auto pending = connection->PendingQuery(std::move(statements[i]));
|
||||||
auto pending = connection->PendingQuery(std::move(statement));
|
|
||||||
// Return any error found before execution.
|
// Return any error found before execution.
|
||||||
if (pending->HasError()) {
|
if (pending->HasError()) {
|
||||||
SetResponseErrorResult(res, pending->GetError());
|
SetResponseErrorResult(res, pending->GetError());
|
||||||
@@ -412,7 +411,9 @@ void HttpServer::DoHandleRun(const httplib::Request &req,
|
|||||||
pending->Execute();
|
pending->Execute();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SetResponseErrorResult(res, "Unexpected PendingExecutionResult");
|
SetResponseErrorResult(
|
||||||
|
res, StringUtil::Format("Unexpected PendingExecutionResult: %d",
|
||||||
|
exec_result));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -488,7 +489,9 @@ void HttpServer::DoHandleRun(const httplib::Request &req,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
SetResponseErrorResult(res, "Unexpected PendingExecutionResult");
|
SetResponseErrorResult(
|
||||||
|
res, StringUtil::Format("Unexpected PendingExecutionResult: %d",
|
||||||
|
exec_result));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user