MCPcopy Create free account
hub / github.com/apache/kvrocks / FunctionGetCode

Method FunctionGetCode

src/server/server.cc:1904–1913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1902}
1903
1904Status Server::FunctionGetCode(const std::string &lib, std::string *code) const {
1905 std::string func_name = engine::kLuaLibCodePrefix + lib;
1906 auto cf = storage->GetCFHandle(ColumnFamilyID::Propagate);
1907 engine::Context ctx(storage);
1908 auto s = storage->Get(ctx, ctx.GetReadOptions(), cf, func_name, code);
1909 if (!s.ok()) {
1910 return {s.IsNotFound() ? Status::NotFound : Status::NotOK, s.ToString()};
1911 }
1912 return Status::OK();
1913}
1914
1915Status Server::FunctionGetLib(const std::string &func, std::string *lib) const {
1916 std::string func_name = engine::kLuaFuncLibPrefix + func;

Callers 2

FunctionIsLibExistFunction · 0.80
FunctionCallFunction · 0.80

Calls 4

GetCFHandleMethod · 0.80
GetReadOptionsMethod · 0.80
GetMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected