Sha256: 09748e3084e3b74a2e8c2c65fa68e445256e54e798af8922f7026be371fd5200
Contents?: true
Size: 1.86 KB
Versions: 4
Compression:
Stored size: 1.86 KB
Contents
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2020 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <protocol/unsigned_leb128.h> #include <protocol/client_opcode.hxx> #include <operations/document_id.hxx> namespace couchbase::protocol { class remove_response_body { public: static const inline client_opcode opcode = client_opcode::remove; public: bool parse(protocol::status, const header_buffer& header, const std::vector<uint8_t>&, const cmd_info&) { Expects(header[1] == static_cast<uint8_t>(opcode)); return false; } }; class remove_request_body { public: using response_body_type = remove_response_body; static const inline client_opcode opcode = client_opcode::remove; private: std::string key_; public: void id(const operations::document_id& id) { key_ = id.key; } const std::string& key() { return key_; } const std::vector<std::uint8_t>& extension() { static std::vector<std::uint8_t> empty; return empty; } const std::vector<std::uint8_t>& value() { static std::vector<std::uint8_t> empty; return empty; } std::size_t size() { return key_.size(); } }; } // namespace couchbase::protocol
Version data entries
4 entries across 4 versions & 1 rubygems