| 1885 | } |
| 1886 | |
| 1887 | Status Server::ScriptGet(const std::string &sha, std::string *body) const { |
| 1888 | std::string func_name = engine::kLuaFuncSHAPrefix + sha; |
| 1889 | auto cf = storage->GetCFHandle(ColumnFamilyID::Propagate); |
| 1890 | engine::Context ctx(storage); |
| 1891 | auto s = storage->Get(ctx, ctx.GetReadOptions(), cf, func_name, body); |
| 1892 | if (!s.ok()) { |
| 1893 | return {s.IsNotFound() ? Status::NotFound : Status::NotOK, s.ToString()}; |
| 1894 | } |
| 1895 | return Status::OK(); |
| 1896 | } |
| 1897 | |
| 1898 | Status Server::ScriptSet(const std::string &sha, const std::string &body) const { |
| 1899 | std::string func_name = engine::kLuaFuncSHAPrefix + sha; |
no test coverage detected