couchbase 3.4.1-arm64-darwin-20 → 3.4.3-arm64-darwin-20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/couchbase/authenticator.rb +0 -1
- data/lib/couchbase/cluster.rb +13 -13
- data/lib/couchbase/cluster_registry.rb +7 -2
- data/lib/couchbase/config_profiles.rb +1 -1
- data/lib/couchbase/configuration.rb +3 -4
- data/lib/couchbase/json_transcoder.rb +12 -5
- data/lib/couchbase/libcouchbase.bundle +0 -0
- data/lib/couchbase/management/collection_query_index_manager.rb +54 -15
- data/lib/couchbase/management/query_index_manager.rb +70 -5
- data/lib/couchbase/options.rb +85 -2
- data/lib/couchbase/raw_binary_transcoder.rb +37 -0
- data/lib/couchbase/raw_json_transcoder.rb +38 -0
- data/lib/couchbase/raw_string_transcoder.rb +40 -0
- data/lib/couchbase/search_options.rb +163 -240
- data/lib/couchbase/transcoder_flags.rb +62 -0
- data/lib/couchbase/version.rb +1 -1
- metadata +10 -6
@@ -0,0 +1,62 @@
|
|
1
|
+
# Copyright 2023. 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
|
+
# @api private
|
17
|
+
class TranscoderFlags
|
18
|
+
FORMAT_MAP = {
|
19
|
+
reserved: 0,
|
20
|
+
private: 1,
|
21
|
+
json: 2,
|
22
|
+
binary: 3,
|
23
|
+
string: 4,
|
24
|
+
}.freeze
|
25
|
+
INV_FORMAT_MAP = FORMAT_MAP.invert.freeze
|
26
|
+
|
27
|
+
COMPRESSION_MAP = {none: 0}.freeze
|
28
|
+
INV_COMPRESSION_MAP = COMPRESSION_MAP.invert
|
29
|
+
|
30
|
+
attr_reader :format
|
31
|
+
attr_reader :compression
|
32
|
+
attr_reader :lower_bits
|
33
|
+
|
34
|
+
def initialize(format:, compression: :none, lower_bits: 0)
|
35
|
+
@format = format
|
36
|
+
@compression = compression
|
37
|
+
@lower_bits = lower_bits
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.decode(flags)
|
41
|
+
return TranscoderFlags.new(format: flags) if flags.is_a?(Symbol)
|
42
|
+
|
43
|
+
common_flags = flags >> 24
|
44
|
+
lower_bits = flags & 0x00ffff
|
45
|
+
|
46
|
+
return TranscoderFlags.new(format: nil, lower_bits: lower_bits) if common_flags.zero?
|
47
|
+
|
48
|
+
compression_bits = common_flags >> 5
|
49
|
+
format_bits = common_flags & 0x0f
|
50
|
+
TranscoderFlags.new(
|
51
|
+
format: INV_FORMAT_MAP[format_bits],
|
52
|
+
compression: INV_COMPRESSION_MAP[compression_bits],
|
53
|
+
lower_bits: lower_bits
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
def encode
|
58
|
+
common_flags = (COMPRESSION_MAP[@compression] << 5) | FORMAT_MAP[@format]
|
59
|
+
(common_flags << 24) | @lower_bits
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/lib/couchbase/version.rb
CHANGED
@@ -19,5 +19,5 @@ module Couchbase
|
|
19
19
|
# $ ruby -rcouchbase -e 'pp Couchbase::VERSION'
|
20
20
|
# {:sdk=>"3.4.0", :ruby_abi=>"3.1.0", :revision=>"416fe68e6029ec8a4c40611cf6e6b30d3b90d20f"}
|
21
21
|
VERSION = {} unless defined?(VERSION) # rubocop:disable Style/MutableConstant
|
22
|
-
VERSION.update(:sdk => "3.4.
|
22
|
+
VERSION.update(:sdk => "3.4.3".freeze)
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: couchbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.3
|
5
5
|
platform: arm64-darwin-20
|
6
6
|
authors:
|
7
7
|
- Sergey Avseyev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Modern SDK for Couchbase Server
|
14
14
|
email:
|
@@ -56,9 +56,13 @@ files:
|
|
56
56
|
- lib/couchbase/options.rb
|
57
57
|
- lib/couchbase/query_options.rb
|
58
58
|
- lib/couchbase/railtie.rb
|
59
|
+
- lib/couchbase/raw_binary_transcoder.rb
|
60
|
+
- lib/couchbase/raw_json_transcoder.rb
|
61
|
+
- lib/couchbase/raw_string_transcoder.rb
|
59
62
|
- lib/couchbase/scope.rb
|
60
63
|
- lib/couchbase/search_options.rb
|
61
64
|
- lib/couchbase/subdoc.rb
|
65
|
+
- lib/couchbase/transcoder_flags.rb
|
62
66
|
- lib/couchbase/utils.rb
|
63
67
|
- lib/couchbase/utils/generic_logger_adapter.rb
|
64
68
|
- lib/couchbase/utils/stdlib_logger_adapter.rb
|
@@ -73,9 +77,9 @@ metadata:
|
|
73
77
|
homepage_uri: https://docs.couchbase.com/ruby-sdk/current/hello-world/start-using-sdk.html
|
74
78
|
bug_tracker_uri: https://couchbase.com/issues/browse/RCBC
|
75
79
|
mailing_list_uri: https://forums.couchbase.com/c/ruby-sdk
|
76
|
-
source_code_uri: https://github.com/couchbase/couchbase-ruby-client/tree/3.4.
|
77
|
-
changelog_uri: https://github.com/couchbase/couchbase-ruby-client/releases/tag/3.4.
|
78
|
-
documentation_uri: https://docs.couchbase.com/sdk-api/couchbase-ruby-client-3.4.
|
80
|
+
source_code_uri: https://github.com/couchbase/couchbase-ruby-client/tree/3.4.3
|
81
|
+
changelog_uri: https://github.com/couchbase/couchbase-ruby-client/releases/tag/3.4.3
|
82
|
+
documentation_uri: https://docs.couchbase.com/sdk-api/couchbase-ruby-client-3.4.3/index.html
|
79
83
|
github_repo: ssh://github.com/couchbase/couchbase-ruby-client
|
80
84
|
rubygems_mfa_required: 'true'
|
81
85
|
post_install_message:
|
@@ -95,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
99
|
- !ruby/object:Gem::Version
|
96
100
|
version: '0'
|
97
101
|
requirements: []
|
98
|
-
rubygems_version: 3.4.
|
102
|
+
rubygems_version: 3.4.10
|
99
103
|
signing_key:
|
100
104
|
specification_version: 4
|
101
105
|
summary: SDK for Couchbase Server
|