diff --git a/src/http_handler/handler.cpp b/src/http_handler/handler.cpp index 0dd1c24..4b2ce83 100644 --- a/src/http_handler/handler.cpp +++ b/src/http_handler/handler.cpp @@ -55,9 +55,9 @@ void HttpHandler(const duckdb_httplib_openssl::Request& req, duckdb_httplib_open auto elapsed = std::chrono::duration_cast(end - start); QueryExecStats stats { - .elapsed_sec = static_cast(elapsed.count()) / 1000, - .read_bytes = 0, - .read_rows = 0 + static_cast(elapsed.count()) / 1000, + 0, + 0 }; // Format output @@ -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), }; } } @@ -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))), }; }