Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vhiairrassary committed Dec 17, 2024
1 parent c3d2472 commit 3c1f8f2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/http_handler/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ void HttpHandler(const duckdb_httplib_openssl::Request& req, duckdb_httplib_open
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);

QueryExecStats stats {
.elapsed_sec = static_cast<float>(elapsed.count()) / 1000,
.read_bytes = 0,
.read_rows = 0
static_cast<float>(elapsed.count()) / 1000,
0,
0
};

// Format output
Expand Down Expand Up @@ -122,8 +122,9 @@ QueryApiParameters ExtractQueryApiParameters(const duckdb_httplib_openssl::Reque
}
else {
return QueryApiParameters {
.sqlQueryOpt = ExtractSqlQuerySimple(req),
.outputFormat = ExtractOutputFormatSimple(req),
ExtractSqlQuerySimple(req),
std::nullopt,
ExtractOutputFormatSimple(req),
};
}
}
Expand Down Expand Up @@ -210,9 +211,9 @@ QueryApiParameters ExtractQueryApiParametersComplexImpl(yyjson_doc* bodyDoc) {
}

return QueryApiParameters {
.sqlQueryOpt = std::string(yyjson_get_str(queryVal)),
.sqlParametersOpt = ExtractQueryParameters(yyjson_obj_get(bodyRoot, "parameters")),
.outputFormat = ParseOutputFormat(std::string(yyjson_get_str(formatVal))),
std::string(yyjson_get_str(queryVal)),
ExtractQueryParameters(yyjson_obj_get(bodyRoot, "parameters")),
ParseOutputFormat(std::string(yyjson_get_str(formatVal))),
};
}

Expand Down

0 comments on commit 3c1f8f2

Please sign in to comment.