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

Method FunctionGetLib

src/server/server.cc:1915–1924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1913}
1914
1915Status Server::FunctionGetLib(const std::string &func, std::string *lib) const {
1916 std::string func_name = engine::kLuaFuncLibPrefix + func;
1917 auto cf = storage->GetCFHandle(ColumnFamilyID::Propagate);
1918 engine::Context ctx(storage);
1919 auto s = storage->Get(ctx, ctx.GetReadOptions(), cf, func_name, lib);
1920 if (!s.ok()) {
1921 return {s.IsNotFound() ? Status::NotFound : Status::NotOK, s.ToString()};
1922 }
1923 return Status::OK();
1924}
1925
1926Status Server::FunctionSetCode(const std::string &lib, const std::string &code) const {
1927 std::string func_name = engine::kLuaLibCodePrefix + lib;

Callers 1

FunctionCallFunction · 0.80

Calls 4

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

Tested by

no test coverage detected