libcouchbase-mapo 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.gitmodules +3 -0
- data/.rspec +1 -0
- data/.travis.yml +38 -0
- data/Gemfile +4 -0
- data/LICENSE +24 -0
- data/README.md +445 -0
- data/Rakefile +76 -0
- data/ext/README.md +6 -0
- data/ext/Rakefile +19 -0
- data/lib/libcouchbase.rb +40 -0
- data/lib/libcouchbase/bucket.rb +825 -0
- data/lib/libcouchbase/callbacks.rb +69 -0
- data/lib/libcouchbase/connection.rb +886 -0
- data/lib/libcouchbase/design_docs.rb +92 -0
- data/lib/libcouchbase/error.rb +68 -0
- data/lib/libcouchbase/ext/libcouchbase.rb +1175 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdbase.rb +23 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdcounter.rb +36 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdendure.rb +26 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdfts.rb +24 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdget.rb +30 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdgetreplica.rb +49 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdhttp.rb +58 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdn1ql.rb +40 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdobseqno.rb +33 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdobserve.rb +30 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdstore.rb +40 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdstoredur.rb +45 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdsubdoc.rb +61 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdverbosity.rb +29 -0
- data/lib/libcouchbase/ext/libcouchbase/cmdviewquery.rb +61 -0
- data/lib/libcouchbase/ext/libcouchbase/contigbuf.rb +14 -0
- data/lib/libcouchbase/ext/libcouchbase/create_st.rb +15 -0
- data/lib/libcouchbase/ext/libcouchbase/create_st0.rb +23 -0
- data/lib/libcouchbase/ext/libcouchbase/create_st1.rb +26 -0
- data/lib/libcouchbase/ext/libcouchbase/create_st2.rb +32 -0
- data/lib/libcouchbase/ext/libcouchbase/create_st3.rb +26 -0
- data/lib/libcouchbase/ext/libcouchbase/crst_u.rb +20 -0
- data/lib/libcouchbase/ext/libcouchbase/durability_opts_st_v.rb +11 -0
- data/lib/libcouchbase/ext/libcouchbase/durability_opts_t.rb +14 -0
- data/lib/libcouchbase/ext/libcouchbase/durabilityopt_sv0.rb +63 -0
- data/lib/libcouchbase/ext/libcouchbase/enums.rb +1007 -0
- data/lib/libcouchbase/ext/libcouchbase/fragbuf.rb +18 -0
- data/lib/libcouchbase/ext/libcouchbase/ftshandle.rb +7 -0
- data/lib/libcouchbase/ext/libcouchbase/histogram.rb +34 -0
- data/lib/libcouchbase/ext/libcouchbase/http_request_t.rb +7 -0
- data/lib/libcouchbase/ext/libcouchbase/keybuf.rb +20 -0
- data/lib/libcouchbase/ext/libcouchbase/multicmd_ctx.rb +30 -0
- data/lib/libcouchbase/ext/libcouchbase/mutation_token.rb +17 -0
- data/lib/libcouchbase/ext/libcouchbase/n1qlhandle.rb +7 -0
- data/lib/libcouchbase/ext/libcouchbase/n1qlparams.rb +7 -0
- data/lib/libcouchbase/ext/libcouchbase/respbase.rb +29 -0
- data/lib/libcouchbase/ext/libcouchbase/respcounter.rb +32 -0
- data/lib/libcouchbase/ext/libcouchbase/respendure.rb +49 -0
- data/lib/libcouchbase/ext/libcouchbase/respfts.rb +40 -0
- data/lib/libcouchbase/ext/libcouchbase/respget.rb +44 -0
- data/lib/libcouchbase/ext/libcouchbase/resphttp.rb +48 -0
- data/lib/libcouchbase/ext/libcouchbase/respmcversion.rb +38 -0
- data/lib/libcouchbase/ext/libcouchbase/respn1ql.rb +41 -0
- data/lib/libcouchbase/ext/libcouchbase/respobseqno.rb +52 -0
- data/lib/libcouchbase/ext/libcouchbase/respobserve.rb +41 -0
- data/lib/libcouchbase/ext/libcouchbase/respserverbase.rb +32 -0
- data/lib/libcouchbase/ext/libcouchbase/respstats.rb +38 -0
- data/lib/libcouchbase/ext/libcouchbase/respstore.rb +32 -0
- data/lib/libcouchbase/ext/libcouchbase/respstoredur.rb +38 -0
- data/lib/libcouchbase/ext/libcouchbase/respsubdoc.rb +35 -0
- data/lib/libcouchbase/ext/libcouchbase/respviewquery.rb +67 -0
- data/lib/libcouchbase/ext/libcouchbase/sdentry.rb +22 -0
- data/lib/libcouchbase/ext/libcouchbase/sdspec.rb +31 -0
- data/lib/libcouchbase/ext/libcouchbase/t.rb +7 -0
- data/lib/libcouchbase/ext/libcouchbase/valbuf.rb +22 -0
- data/lib/libcouchbase/ext/libcouchbase/valbuf_u_buf.rb +14 -0
- data/lib/libcouchbase/ext/libcouchbase/viewhandle.rb +7 -0
- data/lib/libcouchbase/ext/libcouchbase_libuv.rb +22 -0
- data/lib/libcouchbase/ext/tasks.rb +39 -0
- data/lib/libcouchbase/n1ql.rb +78 -0
- data/lib/libcouchbase/query_full_text.rb +147 -0
- data/lib/libcouchbase/query_n1ql.rb +123 -0
- data/lib/libcouchbase/query_view.rb +135 -0
- data/lib/libcouchbase/results_fiber.rb +281 -0
- data/lib/libcouchbase/results_native.rb +220 -0
- data/lib/libcouchbase/subdoc_request.rb +139 -0
- data/lib/libcouchbase/version.rb +5 -0
- data/libcouchbase.gemspec +68 -0
- data/spec/bucket_spec.rb +290 -0
- data/spec/connection_spec.rb +257 -0
- data/spec/design_docs_spec.rb +31 -0
- data/spec/error_spec.rb +26 -0
- data/spec/fts_spec.rb +135 -0
- data/spec/n1ql_spec.rb +206 -0
- data/spec/results_libuv_spec.rb +244 -0
- data/spec/results_native_spec.rb +259 -0
- data/spec/seed/2016-10-25T043505Z/2016-10-25T043505Z-full/bucket-default/design.json +1 -0
- data/spec/seed/2016-10-25T043505Z/2016-10-25T043505Z-full/bucket-default/node-127.0.0.1%3A8091/data-0000.cbb +0 -0
- data/spec/seed/2016-10-25T043505Z/2016-10-25T043505Z-full/bucket-default/node-127.0.0.1%3A8091/failover.json +1 -0
- data/spec/seed/2016-10-25T043505Z/2016-10-25T043505Z-full/bucket-default/node-127.0.0.1%3A8091/meta.json +1 -0
- data/spec/seed/2016-10-25T043505Z/2016-10-25T043505Z-full/bucket-default/node-127.0.0.1%3A8091/seqno.json +1 -0
- data/spec/seed/2016-10-25T043505Z/2016-10-25T043505Z-full/bucket-default/node-127.0.0.1%3A8091/snapshot_markers.json +1 -0
- data/spec/subdoc_spec.rb +192 -0
- data/spec/view_spec.rb +201 -0
- data/windows_build.md +36 -0
- metadata +265 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
class CMDBASE < FFI::Struct
|
16
|
+
layout :cmdflags, :uint,
|
17
|
+
:exptime, :uint,
|
18
|
+
:cas, :ulong_long,
|
19
|
+
:key, KEYBUF.by_value,
|
20
|
+
:hashkey, KEYBUF.by_value
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :delta ::
|
16
|
+
# (Integer) Delta value. If this number is negative the item on the server is
|
17
|
+
# decremented. If this number is positive then the item on the server
|
18
|
+
# is incremented
|
19
|
+
# :initial ::
|
20
|
+
# (Integer) If the item does not exist on the server (and `create` is true) then
|
21
|
+
# this will be the initial value for the item.
|
22
|
+
# :create ::
|
23
|
+
# (Integer) Boolean value. Create the item and set it to `initial` if it does not
|
24
|
+
# already exist
|
25
|
+
class CMDCOUNTER < FFI::Struct
|
26
|
+
layout :cmdflags, :uint,
|
27
|
+
:exptime, :uint,
|
28
|
+
:cas, :ulong_long,
|
29
|
+
:key, KEYBUF.by_value,
|
30
|
+
:hashkey, KEYBUF.by_value,
|
31
|
+
:delta, :long_long,
|
32
|
+
:initial, :ulong_long,
|
33
|
+
:create, :int
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :mutation_token ::
|
16
|
+
# (MUTATIONTOKEN)
|
17
|
+
class CMDENDURE < FFI::Struct
|
18
|
+
layout :cmdflags, :uint,
|
19
|
+
:exptime, :uint,
|
20
|
+
:cas, :ulong_long,
|
21
|
+
:key, KEYBUF.by_value,
|
22
|
+
:hashkey, KEYBUF.by_value,
|
23
|
+
:mutation_token, MUTATIONTOKEN.by_ref
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# @brief Search Command
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer) Modifiers for command. Currently none are defined
|
7
|
+
# :query ::
|
8
|
+
# (String) Encoded JSON query
|
9
|
+
# :nquery ::
|
10
|
+
# (Integer) Length of JSON query
|
11
|
+
# :callback ::
|
12
|
+
# (Proc(callback_ftscallback)) Callback to be invoked. This must be supplied
|
13
|
+
# :handle ::
|
14
|
+
# (FFI::Pointer(*FTSHANDLE)) Optional pointer to store the handle. The handle may then be
|
15
|
+
# used for query cancellation via lcb_fts_cancel()
|
16
|
+
class CMDFTS < FFI::Struct
|
17
|
+
layout :cmdflags, :uint,
|
18
|
+
:query, :pointer,
|
19
|
+
:nquery, :ulong,
|
20
|
+
:callback, :ftscallback,
|
21
|
+
:handle, :pointer
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :lock ::
|
16
|
+
# (Integer) If set to true, the `exptime` field inside `options` will take to mean
|
17
|
+
# the time the lock should be held. While the lock is held, other operations
|
18
|
+
# trying to access the key will fail with an `LCB_ETMPFAIL` error. The
|
19
|
+
# item may be unlocked either via `lcb_unlock3()` or via a mutation
|
20
|
+
# operation with a supplied CAS
|
21
|
+
class CMDGET < FFI::Struct
|
22
|
+
layout :cmdflags, :uint,
|
23
|
+
:exptime, :uint,
|
24
|
+
:cas, :ulong_long,
|
25
|
+
:key, KEYBUF.by_value,
|
26
|
+
:hashkey, KEYBUF.by_value,
|
27
|
+
:lock, :int
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :strategy ::
|
16
|
+
# (ReplicaT) Strategy for selecting a replica. The default is ::LCB_REPLICA_FIRST
|
17
|
+
# which results in the client trying each replica in sequence until a
|
18
|
+
# successful reply is found, and returned in the callback.
|
19
|
+
#
|
20
|
+
# ::LCB_REPLICA_FIRST evaluates to 0.
|
21
|
+
#
|
22
|
+
# Other options include:
|
23
|
+
# <ul>
|
24
|
+
# <li>::LCB_REPLICA_ALL - queries all replicas concurrently and dispatches
|
25
|
+
# a callback for each reply</li>
|
26
|
+
# <li>::LCB_REPLICA_SELECT - queries a specific replica indicated in the
|
27
|
+
# #index field</li>
|
28
|
+
# </ul>
|
29
|
+
#
|
30
|
+
# @note When ::LCB_REPLICA_ALL is selected, the callback will be invoked
|
31
|
+
# multiple times, one for each replica. The final callback will have the
|
32
|
+
# ::LCB_RESP_F_FINAL bit set in the lcb_RESPBASE::rflags field. The final
|
33
|
+
# response will also contain the response from the last replica to
|
34
|
+
# respond.
|
35
|
+
# :index ::
|
36
|
+
# (Integer) Valid only when #strategy is ::LCB_REPLICA_SELECT, specifies the replica
|
37
|
+
# index number to query. This should be no more than `nreplicas-1`
|
38
|
+
# where `nreplicas` is the number of replicas the bucket is configured with.
|
39
|
+
class CMDGETREPLICA < FFI::Struct
|
40
|
+
layout :cmdflags, :uint,
|
41
|
+
:exptime, :uint,
|
42
|
+
:cas, :ulong_long,
|
43
|
+
:key, KEYBUF.by_value,
|
44
|
+
:hashkey, KEYBUF.by_value,
|
45
|
+
:strategy, ReplicaT,
|
46
|
+
:index, :int
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :type ::
|
16
|
+
# (HttpTypeT) Type of request to issue. LCB_HTTP_TYPE_VIEW will issue a request
|
17
|
+
# against a random node's view API. LCB_HTTP_TYPE_MANAGEMENT will issue
|
18
|
+
# a request against a random node's administrative API, and
|
19
|
+
# LCB_HTTP_TYPE_RAW will issue a request against an arbitrary host.
|
20
|
+
# :method ::
|
21
|
+
# (HttpMethodT) < HTTP Method to use
|
22
|
+
# :body ::
|
23
|
+
# (String) If the request requires a body (e.g. `PUT` or `POST`) then it will
|
24
|
+
# go here. Be sure to indicate the length of the body too.
|
25
|
+
# :nbody ::
|
26
|
+
# (Integer) Length of the body for the request
|
27
|
+
# :reqhandle ::
|
28
|
+
# (FFI::Pointer(*HttpRequestT)) If non-NULL, will be assigned a handle which may be used to
|
29
|
+
# subsequently cancel the request
|
30
|
+
# :content_type ::
|
31
|
+
# (String) For views, set this to `application/json`
|
32
|
+
# :username ::
|
33
|
+
# (String) Username to authenticate with, if left empty, will use the credentials
|
34
|
+
# passed to lcb_create()
|
35
|
+
# :password ::
|
36
|
+
# (String) Password to authenticate with, if left empty, will use the credentials
|
37
|
+
# passed to lcb_create()
|
38
|
+
# :host ::
|
39
|
+
# (String) If set, this must be a string in the form of `http://host:port`. Should
|
40
|
+
# only be used for raw requests.
|
41
|
+
class CMDHTTP < FFI::Struct
|
42
|
+
layout :cmdflags, :uint,
|
43
|
+
:exptime, :uint,
|
44
|
+
:cas, :ulong_long,
|
45
|
+
:key, KEYBUF.by_value,
|
46
|
+
:hashkey, KEYBUF.by_value,
|
47
|
+
:type, HttpTypeT,
|
48
|
+
:method, HttpMethodT,
|
49
|
+
:body, :pointer,
|
50
|
+
:nbody, :ulong,
|
51
|
+
:reqhandle, :pointer,
|
52
|
+
:content_type, :pointer,
|
53
|
+
:username, :pointer,
|
54
|
+
:password, :pointer,
|
55
|
+
:host, :pointer
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :query ::
|
8
|
+
# (String) Query to be placed in the POST request. The library will not perform
|
9
|
+
# any conversions or validation on this string, so it is up to the user
|
10
|
+
# (or wrapping library) to ensure that the string is well formed.
|
11
|
+
#
|
12
|
+
# If using the @ref lcb_N1QLPARAMS structure, the lcb_n1p_mkcmd() function
|
13
|
+
# will properly populate this field.
|
14
|
+
#
|
15
|
+
# In general the string should either be JSON (in which case, the
|
16
|
+
# #content_type field should be `application/json`) or url-encoded
|
17
|
+
# (in which case the #content_type field should be
|
18
|
+
# `application/x-www-form-urlencoded`)
|
19
|
+
# :nquery ::
|
20
|
+
# (Integer) Length of the query data
|
21
|
+
# :host ::
|
22
|
+
# (String) Ignored since version 2.5.3
|
23
|
+
# :content_type ::
|
24
|
+
# (String) Ignored since version 2.5.3
|
25
|
+
# :callback ::
|
26
|
+
# (Proc(callback_n1qlcallback)) Callback to be invoked for each row
|
27
|
+
# :handle ::
|
28
|
+
# (FFI::Pointer(*N1QLHANDLE)) Request handle. Will be set to the handle which may be passed to
|
29
|
+
# lcb_n1ql_cancel()
|
30
|
+
class CMDN1QL < FFI::Struct
|
31
|
+
layout :cmdflags, :uint,
|
32
|
+
:query, :string,
|
33
|
+
:nquery, :ulong,
|
34
|
+
:host, :string,
|
35
|
+
:content_type, :string,
|
36
|
+
:callback, :n1qlcallback,
|
37
|
+
:handle, :pointer
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :server_index ::
|
16
|
+
# (Integer) Server index to target. The server index must be valid and must also
|
17
|
+
# be either a master or a replica for the vBucket indicated in #vbid
|
18
|
+
# :vbid ::
|
19
|
+
# (Integer) < vBucket ID to query
|
20
|
+
# :uuid ::
|
21
|
+
# (Integer) < UUID known to client which should be queried
|
22
|
+
class CMDOBSEQNO < FFI::Struct
|
23
|
+
layout :cmdflags, :uint,
|
24
|
+
:exptime, :uint,
|
25
|
+
:cas, :ulong_long,
|
26
|
+
:key, KEYBUF.by_value,
|
27
|
+
:hashkey, KEYBUF.by_value,
|
28
|
+
:server_index, :ushort,
|
29
|
+
:vbid, :ushort,
|
30
|
+
:uuid, :ulong_long
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :servers ::
|
16
|
+
# (FFI::Pointer(*U16)) For internal use: This determines the servers the command should be
|
17
|
+
# routed to. Each entry is an index within the server.
|
18
|
+
# :nservers ::
|
19
|
+
# (Integer)
|
20
|
+
class CMDOBSERVE < FFI::Struct
|
21
|
+
layout :cmdflags, :uint,
|
22
|
+
:exptime, :uint,
|
23
|
+
:cas, :ulong_long,
|
24
|
+
:key, KEYBUF.by_value,
|
25
|
+
:hashkey, KEYBUF.by_value,
|
26
|
+
:servers, :pointer,
|
27
|
+
:nservers, :ulong
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :value ::
|
16
|
+
# (VALBUF) Value to store on the server. The value may be set using the
|
17
|
+
# LCB_CMD_SET_VALUE() or LCB_CMD_SET_VALUEIOV() API
|
18
|
+
# :flags ::
|
19
|
+
# (Integer) Format flags used by clients to determine the underlying encoding of
|
20
|
+
# the value. This value is also returned during retrieval operations in the
|
21
|
+
# lcb_RESPGET::itmflags field
|
22
|
+
# :datatype ::
|
23
|
+
# (Integer) Do not set this value for now
|
24
|
+
# :operation ::
|
25
|
+
# (StorageT) Controls *how* the operation is perfomed. See the documentation for
|
26
|
+
# @ref lcb_storage_t for the options. There is no default value for this
|
27
|
+
# field.
|
28
|
+
class CMDSTORE < FFI::Struct
|
29
|
+
layout :cmdflags, :uint,
|
30
|
+
:exptime, :uint,
|
31
|
+
:cas, :ulong_long,
|
32
|
+
:key, KEYBUF.by_value,
|
33
|
+
:hashkey, KEYBUF.by_value,
|
34
|
+
:value, VALBUF.by_value,
|
35
|
+
:flags, :uint,
|
36
|
+
:datatype, :uchar,
|
37
|
+
:operation, StorageT
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Libcouchbase::Ext
|
2
|
+
# (Not documented)
|
3
|
+
#
|
4
|
+
# ## Fields:
|
5
|
+
# :cmdflags ::
|
6
|
+
# (Integer)
|
7
|
+
# :exptime ::
|
8
|
+
# (Integer)
|
9
|
+
# :cas ::
|
10
|
+
# (Integer)
|
11
|
+
# :key ::
|
12
|
+
# (KEYBUF)
|
13
|
+
# :hashkey ::
|
14
|
+
# (KEYBUF)
|
15
|
+
# :value ::
|
16
|
+
# (VALBUF) < @see lcb_CMDSTORE::value
|
17
|
+
# :flags ::
|
18
|
+
# (Integer) < @see lcb_CMDSTORE::flags
|
19
|
+
# :datatype ::
|
20
|
+
# (Integer) < @private
|
21
|
+
# :operation ::
|
22
|
+
# (StorageT) < @see lcb_CMDSTORE::operation
|
23
|
+
# :persist_to ::
|
24
|
+
# (Integer) Number of nodes to persist to. If negative, will be capped at the maximum
|
25
|
+
# allowable for the current cluster.
|
26
|
+
# @see lcb_DURABILITYOPTSv0::persist_to
|
27
|
+
# :replicate_to ::
|
28
|
+
# (Integer) Number of nodes to replicate to. If negative, will be capped at the maximum
|
29
|
+
# allowable for the current cluster.
|
30
|
+
# @see lcb_DURABILITYOPTSv0::replicate_to
|
31
|
+
class CMDSTOREDUR < FFI::Struct
|
32
|
+
layout :cmdflags, :uint,
|
33
|
+
:exptime, :uint,
|
34
|
+
:cas, :ulong_long,
|
35
|
+
:key, KEYBUF.by_value,
|
36
|
+
:hashkey, KEYBUF.by_value,
|
37
|
+
:value, VALBUF.by_value,
|
38
|
+
:flags, :uint,
|
39
|
+
:datatype, :uchar,
|
40
|
+
:operation, StorageT,
|
41
|
+
:persist_to, :char,
|
42
|
+
:replicate_to, :char
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|