couchbase 3.4.0-arm64-darwin-20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +202 -0
- data/README.md +154 -0
- data/ext/extconf.rb +0 -0
- data/lib/active_support/cache/couchbase_store.rb +339 -0
- data/lib/couchbase/analytics_options.rb +107 -0
- data/lib/couchbase/authenticator.rb +65 -0
- data/lib/couchbase/binary_collection.rb +128 -0
- data/lib/couchbase/binary_collection_options.rb +24 -0
- data/lib/couchbase/bucket.rb +144 -0
- data/lib/couchbase/cluster.rb +439 -0
- data/lib/couchbase/cluster_registry.rb +44 -0
- data/lib/couchbase/collection.rb +589 -0
- data/lib/couchbase/collection_options.rb +300 -0
- data/lib/couchbase/config_profiles.rb +55 -0
- data/lib/couchbase/configuration.rb +57 -0
- data/lib/couchbase/datastructures/couchbase_list.rb +160 -0
- data/lib/couchbase/datastructures/couchbase_map.rb +194 -0
- data/lib/couchbase/datastructures/couchbase_queue.rb +134 -0
- data/lib/couchbase/datastructures/couchbase_set.rb +128 -0
- data/lib/couchbase/datastructures.rb +24 -0
- data/lib/couchbase/diagnostics.rb +181 -0
- data/lib/couchbase/errors.rb +351 -0
- data/lib/couchbase/json_transcoder.rb +32 -0
- data/lib/couchbase/libcouchbase.bundle +0 -0
- data/lib/couchbase/logger.rb +85 -0
- data/lib/couchbase/management/analytics_index_manager.rb +1127 -0
- data/lib/couchbase/management/bucket_manager.rb +436 -0
- data/lib/couchbase/management/collection_manager.rb +321 -0
- data/lib/couchbase/management/query_index_manager.rb +520 -0
- data/lib/couchbase/management/search_index_manager.rb +408 -0
- data/lib/couchbase/management/user_manager.rb +468 -0
- data/lib/couchbase/management/view_index_manager.rb +237 -0
- data/lib/couchbase/management.rb +27 -0
- data/lib/couchbase/mutation_state.rb +63 -0
- data/lib/couchbase/options.rb +2580 -0
- data/lib/couchbase/query_options.rb +120 -0
- data/lib/couchbase/railtie.rb +45 -0
- data/lib/couchbase/scope.rb +232 -0
- data/lib/couchbase/search_options.rb +1570 -0
- data/lib/couchbase/subdoc.rb +290 -0
- data/lib/couchbase/utils/generic_logger_adapter.rb +38 -0
- data/lib/couchbase/utils/stdlib_logger_adapter.rb +65 -0
- data/lib/couchbase/utils/time.rb +56 -0
- data/lib/couchbase/utils.rb +21 -0
- data/lib/couchbase/version.rb +23 -0
- data/lib/couchbase/view_options.rb +65 -0
- data/lib/couchbase.rb +20 -0
- data/lib/rails/generators/couchbase/config/config_generator.rb +27 -0
- metadata +101 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
# Copyright 2020-2021 Couchbase, Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Couchbase
|
16
|
+
# This namespace includes manager classes to control cluster resources and perform maintenance operations.
|
17
|
+
module Management
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
require "couchbase/management/analytics_index_manager"
|
22
|
+
require "couchbase/management/bucket_manager"
|
23
|
+
require "couchbase/management/collection_manager"
|
24
|
+
require "couchbase/management/query_index_manager"
|
25
|
+
require "couchbase/management/search_index_manager"
|
26
|
+
require "couchbase/management/user_manager"
|
27
|
+
require "couchbase/management/view_index_manager"
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Copyright 2020-2021 Couchbase, Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Couchbase
|
16
|
+
class MutationToken
|
17
|
+
# @return [Integer]
|
18
|
+
attr_accessor :partition_id
|
19
|
+
# @return [Integer]
|
20
|
+
attr_accessor :partition_uuid
|
21
|
+
# @return [Integer]
|
22
|
+
attr_accessor :sequence_number
|
23
|
+
# @return [String] name of the bucket
|
24
|
+
attr_accessor :bucket_name
|
25
|
+
|
26
|
+
# @yieldparam [MutationToken] self
|
27
|
+
def initialize
|
28
|
+
yield self if block_given?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class MutationState
|
33
|
+
# @return [Array<MutationToken>]
|
34
|
+
attr_accessor :tokens
|
35
|
+
|
36
|
+
# Create a mutation state from one or more MutationTokens
|
37
|
+
#
|
38
|
+
# @param [Array<MutationToken>] mutation_tokens the mutation tokens
|
39
|
+
def initialize(*mutation_tokens)
|
40
|
+
@tokens = []
|
41
|
+
add(*mutation_tokens)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Add one or more Mutation tokens to this state
|
45
|
+
#
|
46
|
+
# @param [Array<MutationToken>] mutation_tokens the mutation tokens
|
47
|
+
def add(*mutation_tokens)
|
48
|
+
@tokens |= mutation_tokens
|
49
|
+
end
|
50
|
+
|
51
|
+
# @api private
|
52
|
+
def to_a
|
53
|
+
@tokens.map do |t|
|
54
|
+
{
|
55
|
+
bucket_name: t.bucket_name,
|
56
|
+
partition_id: t.partition_id,
|
57
|
+
partition_uuid: t.partition_uuid,
|
58
|
+
sequence_number: t.sequence_number,
|
59
|
+
}
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|