| 1913 | } |
| 1914 | |
| 1915 | Status 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 | |
| 1926 | Status Server::FunctionSetCode(const std::string &lib, const std::string &code) const { |
| 1927 | std::string func_name = engine::kLuaLibCodePrefix + lib; |
no test coverage detected