Couchbase C++ SDK
1.4.0 (rev. 59aa900)
Toggle main menu visibility
Loading...
Searching...
No Matches
transaction_keyspace.hxx
Go to the documentation of this file.
1
/*
2
* Copyright 2021-Present Couchbase, Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#pragma once
17
18
#include <string>
19
20
namespace
couchbase::transactions
21
{
25
struct
transaction_keyspace
{
26
transaction_keyspace
(std::string bucket_name,
27
std::string scope_name,
28
std::string collection_name);
29
30
explicit
transaction_keyspace
(
const
std::string& bucket_name);
31
32
auto
operator==
(
const
transaction_keyspace
& keyspace)
const
->
bool
33
{
34
return
bucket
== keyspace.bucket &&
scope
== keyspace.scope &&
35
collection
== keyspace.collection;
36
}
37
47
auto
valid
() const ->
bool
;
48
50
template<typename OStream>
51
friend auto operator<<(OStream& os, const
transaction_keyspace
& keyspace) -> OStream&
52
{
53
os <<
"transaction_keyspace{"
;
54
os <<
"bucket: "
<< keyspace.bucket;
55
os <<
", scope: "
<< keyspace.scope;
56
os <<
", collection: "
<< keyspace.collection;
57
os <<
"}"
;
58
return
os;
59
}
60
61
std::string
bucket
;
62
std::string
scope
;
63
std::string
collection
;
64
};
65
}
// namespace couchbase::transactions
couchbase::transactions
Definition
transactions.hxx:43
couchbase::transactions::transaction_keyspace::transaction_keyspace
transaction_keyspace(std::string bucket_name, std::string scope_name, std::string collection_name)
couchbase::transactions::transaction_keyspace::scope
std::string scope
Definition
transaction_keyspace.hxx:62
couchbase::transactions::transaction_keyspace::bucket
std::string bucket
Definition
transaction_keyspace.hxx:61
couchbase::transactions::transaction_keyspace::operator==
auto operator==(const transaction_keyspace &keyspace) const -> bool
Definition
transaction_keyspace.hxx:32
couchbase::transactions::transaction_keyspace::collection
std::string collection
Definition
transaction_keyspace.hxx:63
couchbase::transactions::transaction_keyspace::valid
auto valid() const -> bool
Check if a keyspace is valid.
couchbase::transactions::transaction_keyspace::transaction_keyspace
transaction_keyspace(const std::string &bucket_name)
couchbase
transactions
transaction_keyspace.hxx
Generated by
1.17.0