MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / loadModuleImpl

Method loadModuleImpl

src/Interpreters/WasmModuleManager.cpp:208–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208std::string WasmModuleManager::loadModuleImpl(std::string_view module_name)
209{
210 LOG_DEBUG(log, "Loading WebAssembly module '{}' from disk", module_name);
211 ReadSettings read_settings;
212 auto in_buf = user_scripts_disk->readFile(getFilePath(module_name), read_settings);
213 WriteBufferFromOwnString wasm_code_buffer;
214 copyData(*in_buf, wasm_code_buffer);
215 wasm_code_buffer.finalize();
216 auto wasm_code = std::move(wasm_code_buffer.str());
217 return wasm_code;
218}
219
220std::pair<std::shared_ptr<WasmModule>, UInt256> WasmModuleManager::getModule(std::string_view module_name, FuelMode fuel_mode)
221{

Callers

nothing calls this directly

Calls 4

copyDataFunction · 0.85
readFileMethod · 0.45
finalizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected