Skip to content

Commit a2cc411

Browse files
committed
Separate minimal HTTPFSUtil implementations into httpfs_client and httpfs_client_wasm
1 parent 104bec6 commit a2cc411

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ include_directories(extension/httpfs/include
1212
if (NOT EMSCRIPTEN)
1313
set(EXTRA_SOURCES extension/httpfs/crypto.cpp extension/httpfs/httpfs_client.cpp)
1414
add_definitions(-DOVERRIDE_ENCRYPTION_UTILS=1)
15+
else()
16+
set(EXTRA_SOURCES extension/httpfs/httpfs_client_wasm.cpp)
1517
endif()
1618

1719
build_static_extension(

extension/httpfs/httpfs.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,4 +727,9 @@ void HTTPFileHandle::StoreClient(unique_ptr<HTTPClient> client) {
727727
HTTPFileHandle::~HTTPFileHandle() {
728728
DUCKDB_LOG_FILE_SYSTEM_CLOSE((*this));
729729
};
730+
731+
string HTTPFSUtil::GetName() const {
732+
return "HTTPFS";
733+
}
734+
730735
} // namespace duckdb

extension/httpfs/httpfs_client.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,4 @@ unordered_map<string, string> HTTPFSUtil::ParseGetParameters(const string &text)
160160
return result;
161161
}
162162

163-
string HTTPFSUtil::GetName() const {
164-
return "HTTPFS";
165-
}
166-
167163
} // namespace duckdb
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "httpfs_client.hpp"
2+
#include "http_state.hpp"
3+
4+
namespace duckdb {
5+
6+
unique_ptr<HTTPClient> HTTPFSUtil::InitializeClient(HTTPParams &http_params, const string &proto_host_port) {
7+
throw InternalException("HTTPFSUtil::InitializeClient is not expected to be called");
8+
}
9+
10+
unordered_map<string, string> HTTPFSUtil::ParseGetParameters(const string &text) {
11+
unordered_map<string, string> result;
12+
//TODO: HTTPFSUtil::ParseGetParameters is currently not implemented
13+
return result;
14+
}
15+
16+
} // namespace duckdb

0 commit comments

Comments
 (0)