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,92 @@
|
|
1
|
+
# frozen_string_literal: true, encoding: ASCII-8BIT
|
2
|
+
|
3
|
+
module Libcouchbase
|
4
|
+
class DesignDocs
|
5
|
+
def initialize(bucket, connection, result_meth, **opts)
|
6
|
+
@connection = connection
|
7
|
+
@result = result_meth
|
8
|
+
@bucket = bucket # This reference is required to keep to the connection alive
|
9
|
+
|
10
|
+
opts[:type] = :management
|
11
|
+
result(@connection.http("/pools/default/buckets/#{connection.bucket}/ddocs", **opts).then(proc { |resp|
|
12
|
+
@ddocs = if resp.body.length > 0
|
13
|
+
JSON.parse(resp.body, Connection::DECODE_OPTIONS)[:rows] || []
|
14
|
+
else
|
15
|
+
[]
|
16
|
+
end
|
17
|
+
}))
|
18
|
+
end
|
19
|
+
|
20
|
+
def designs
|
21
|
+
# Remove '_design/' from the id string
|
22
|
+
@ddocs.map { |row| row[:doc][:meta][:id][8..-1] }
|
23
|
+
end
|
24
|
+
|
25
|
+
def design(name)
|
26
|
+
name = name.to_s
|
27
|
+
|
28
|
+
des = nil
|
29
|
+
short = nil
|
30
|
+
|
31
|
+
@ddocs.each do |row|
|
32
|
+
full = row[:doc][:meta][:id]
|
33
|
+
short = full[8..-1]
|
34
|
+
|
35
|
+
if [short, full].include? name
|
36
|
+
des = row[:doc]
|
37
|
+
break
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
des ? DesignDoc.new(short, des, @bucket, @connection, @result) : nil
|
42
|
+
end
|
43
|
+
alias_method :[], :design
|
44
|
+
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
48
|
+
|
49
|
+
# This is a proxy to the Bucket#result method
|
50
|
+
def result(promise)
|
51
|
+
@result.call(promise)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class DesignDoc
|
56
|
+
def initialize(id, row, bucket, connection, result_meth)
|
57
|
+
@connection = connection
|
58
|
+
@result = result_meth
|
59
|
+
@bucket = bucket
|
60
|
+
@row = row
|
61
|
+
@id = id
|
62
|
+
end
|
63
|
+
|
64
|
+
def views
|
65
|
+
@row[:json][:views].keys
|
66
|
+
end
|
67
|
+
|
68
|
+
def view(name, extended: false, **opts, &blk)
|
69
|
+
name = name.to_sym
|
70
|
+
entry = @row[:json][:views][name]
|
71
|
+
if entry
|
72
|
+
@bucket.view(@id, name, **opts, &blk)
|
73
|
+
else
|
74
|
+
nil
|
75
|
+
end
|
76
|
+
end
|
77
|
+
alias_method :[], :view
|
78
|
+
|
79
|
+
def view_config
|
80
|
+
@row[:json][:views]
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
protected
|
85
|
+
|
86
|
+
|
87
|
+
# This is a proxy to the Bucket#result method
|
88
|
+
def result(promise)
|
89
|
+
@result.call(promise)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true, encoding: ASCII-8BIT
|
2
|
+
|
3
|
+
module Libcouchbase
|
4
|
+
class Error < ::StandardError; end
|
5
|
+
|
6
|
+
class Error < ::StandardError
|
7
|
+
class UnknownError < ::Libcouchbase::Error; end
|
8
|
+
class HttpResponseError < ::Libcouchbase::Error
|
9
|
+
attr_accessor :code, :headers, :body
|
10
|
+
end
|
11
|
+
Lookup = {}
|
12
|
+
|
13
|
+
# Borrowed from:
|
14
|
+
# https://github.com/rails/rails/blob/f2489f493b794ee83a86e746b6240031acb8994e/activesupport/lib/active_support/inflector/methods.rb#L66
|
15
|
+
def self.camelize(term, uppercase_first_letter = true)
|
16
|
+
string = term.to_s
|
17
|
+
if uppercase_first_letter
|
18
|
+
string = string.sub(/^[a-z\d]*/) { |match| match.capitalize }
|
19
|
+
else
|
20
|
+
string = string.sub(/^(?:#{inflections.acronym_regex}(?=\b|[A-Z_])|\w)/) { |match| match.downcase }
|
21
|
+
end
|
22
|
+
string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" }
|
23
|
+
string.gsub!('/', '::')
|
24
|
+
string
|
25
|
+
end
|
26
|
+
|
27
|
+
# Dynamically define the error classes
|
28
|
+
Ignore = ['empty', 'error', 'environment']
|
29
|
+
Map = {
|
30
|
+
'noent' => 'not_found',
|
31
|
+
'nomem' => 'no_memory',
|
32
|
+
'noconf' => 'no_config',
|
33
|
+
'2big' => 'too_big',
|
34
|
+
'2deep' => 'too_deep',
|
35
|
+
'inval' => 'invalid'
|
36
|
+
}
|
37
|
+
Ext::ErrorT.symbols.map { |val|
|
38
|
+
# Remove the 'e' character from the start of errors and
|
39
|
+
# Improve descriptions
|
40
|
+
new_val = val.to_s.split('_')
|
41
|
+
.map { |val| (val[0] == 'e' && !Ignore.include?(val)) ? val[1..-1] : val }
|
42
|
+
.map { |val| Map[val] || val }
|
43
|
+
.join('_')
|
44
|
+
|
45
|
+
[val, camelize(new_val).to_sym]
|
46
|
+
}.each do |enum, name|
|
47
|
+
Lookup[enum] = begin
|
48
|
+
# Ensure the constant doesn't exist
|
49
|
+
::Libcouchbase::Error.const_get(name)
|
50
|
+
rescue NameError => e
|
51
|
+
# Build the constants
|
52
|
+
klass = Class.new(::Libcouchbase::Error)
|
53
|
+
::Libcouchbase::Error.const_set(name, klass)
|
54
|
+
klass
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Re-assign the errors that are equivalent
|
59
|
+
Lookup[:not_stored] = KeyNotFound
|
60
|
+
Lookup[:error] = UnknownError
|
61
|
+
|
62
|
+
# Provide a helper
|
63
|
+
def self.lookup(key)
|
64
|
+
look = key.is_a?(Numeric) ? Ext::ErrorT[key] : key.to_sym
|
65
|
+
Lookup[look] || UnknownError
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,1175 @@
|
|
1
|
+
require 'ffi'
|
2
|
+
require 'libcouchbase/ext/libcouchbase/enums'
|
3
|
+
|
4
|
+
module Libcouchbase::Ext
|
5
|
+
extend FFI::Library
|
6
|
+
if FFI::Platform.windows?
|
7
|
+
ffi_lib ::File.expand_path("../../../../ext/libcouchbase.dll", __FILE__)
|
8
|
+
else
|
9
|
+
ffi_lib ::File.expand_path("../../../../ext/libcouchbase/build/lib/libcouchbase.#{FFI::Platform::LIBSUFFIX}", __FILE__)
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'libcouchbase/ext/libcouchbase_libuv'
|
13
|
+
|
14
|
+
autoload :T, 'libcouchbase/ext/libcouchbase/t'
|
15
|
+
autoload :HttpRequestT, 'libcouchbase/ext/libcouchbase/http_request_t'
|
16
|
+
autoload :CONTIGBUF, 'libcouchbase/ext/libcouchbase/contigbuf'
|
17
|
+
autoload :KEYBUF, 'libcouchbase/ext/libcouchbase/keybuf'
|
18
|
+
autoload :FRAGBUF, 'libcouchbase/ext/libcouchbase/fragbuf'
|
19
|
+
autoload :VALBUFUBuf, 'libcouchbase/ext/libcouchbase/valbuf_u_buf'
|
20
|
+
autoload :VALBUF, 'libcouchbase/ext/libcouchbase/valbuf'
|
21
|
+
autoload :CreateSt0, 'libcouchbase/ext/libcouchbase/create_st0'
|
22
|
+
autoload :CreateSt1, 'libcouchbase/ext/libcouchbase/create_st1'
|
23
|
+
autoload :CreateSt2, 'libcouchbase/ext/libcouchbase/create_st2'
|
24
|
+
autoload :CreateSt3, 'libcouchbase/ext/libcouchbase/create_st3'
|
25
|
+
autoload :CRSTU, 'libcouchbase/ext/libcouchbase/crst_u'
|
26
|
+
autoload :CreateSt, 'libcouchbase/ext/libcouchbase/create_st'
|
27
|
+
autoload :CMDBASE, 'libcouchbase/ext/libcouchbase/cmdbase'
|
28
|
+
autoload :RESPBASE, 'libcouchbase/ext/libcouchbase/respbase'
|
29
|
+
autoload :RESPSERVERBASE, 'libcouchbase/ext/libcouchbase/respserverbase'
|
30
|
+
autoload :MUTATIONTOKEN, 'libcouchbase/ext/libcouchbase/mutation_token'
|
31
|
+
autoload :CMDGET, 'libcouchbase/ext/libcouchbase/cmdget'
|
32
|
+
autoload :RESPGET, 'libcouchbase/ext/libcouchbase/respget'
|
33
|
+
autoload :CMDGETREPLICA, 'libcouchbase/ext/libcouchbase/cmdgetreplica'
|
34
|
+
autoload :CMDSTORE, 'libcouchbase/ext/libcouchbase/cmdstore'
|
35
|
+
autoload :RESPSTORE, 'libcouchbase/ext/libcouchbase/respstore'
|
36
|
+
autoload :MULTICMDCTX, 'libcouchbase/ext/libcouchbase/multicmd_ctx'
|
37
|
+
autoload :DURABILITYOPTSv0, 'libcouchbase/ext/libcouchbase/durabilityopt_sv0'
|
38
|
+
autoload :DurabilityOptsStV, 'libcouchbase/ext/libcouchbase/durability_opts_st_v'
|
39
|
+
autoload :DurabilityOptsT, 'libcouchbase/ext/libcouchbase/durability_opts_t'
|
40
|
+
autoload :CMDENDURE, 'libcouchbase/ext/libcouchbase/cmdendure'
|
41
|
+
autoload :RESPENDURE, 'libcouchbase/ext/libcouchbase/respendure'
|
42
|
+
autoload :CMDSTOREDUR, 'libcouchbase/ext/libcouchbase/cmdstoredur'
|
43
|
+
autoload :RESPSTOREDUR, 'libcouchbase/ext/libcouchbase/respstoredur'
|
44
|
+
autoload :CMDOBSERVE, 'libcouchbase/ext/libcouchbase/cmdobserve'
|
45
|
+
autoload :RESPOBSERVE, 'libcouchbase/ext/libcouchbase/respobserve'
|
46
|
+
autoload :CMDOBSEQNO, 'libcouchbase/ext/libcouchbase/cmdobseqno'
|
47
|
+
autoload :RESPOBSEQNO, 'libcouchbase/ext/libcouchbase/respobseqno'
|
48
|
+
autoload :CMDCOUNTER, 'libcouchbase/ext/libcouchbase/cmdcounter'
|
49
|
+
autoload :RESPCOUNTER, 'libcouchbase/ext/libcouchbase/respcounter'
|
50
|
+
autoload :RESPSTATS, 'libcouchbase/ext/libcouchbase/respstats'
|
51
|
+
autoload :RESPMCVERSION, 'libcouchbase/ext/libcouchbase/respmcversion'
|
52
|
+
autoload :CMDVERBOSITY, 'libcouchbase/ext/libcouchbase/cmdverbosity'
|
53
|
+
autoload :CMDHTTP, 'libcouchbase/ext/libcouchbase/cmdhttp'
|
54
|
+
autoload :RESPHTTP, 'libcouchbase/ext/libcouchbase/resphttp'
|
55
|
+
autoload :HISTOGRAM, 'libcouchbase/ext/libcouchbase/histogram'
|
56
|
+
autoload :SDSPEC, 'libcouchbase/ext/libcouchbase/sdspec'
|
57
|
+
autoload :CMDSUBDOC, 'libcouchbase/ext/libcouchbase/cmdsubdoc'
|
58
|
+
autoload :RESPSUBDOC, 'libcouchbase/ext/libcouchbase/respsubdoc'
|
59
|
+
autoload :SDENTRY, 'libcouchbase/ext/libcouchbase/sdentry'
|
60
|
+
autoload :VIEWHANDLE, 'libcouchbase/ext/libcouchbase/viewhandle'
|
61
|
+
autoload :CMDVIEWQUERY, 'libcouchbase/ext/libcouchbase/cmdviewquery'
|
62
|
+
autoload :RESPVIEWQUERY, 'libcouchbase/ext/libcouchbase/respviewquery'
|
63
|
+
autoload :N1QLHANDLE, 'libcouchbase/ext/libcouchbase/n1qlhandle'
|
64
|
+
autoload :N1QLPARAMS, 'libcouchbase/ext/libcouchbase/n1qlparams'
|
65
|
+
autoload :CMDN1QL, 'libcouchbase/ext/libcouchbase/cmdn1ql'
|
66
|
+
autoload :RESPN1QL, 'libcouchbase/ext/libcouchbase/respn1ql'
|
67
|
+
autoload :RESPFTS, 'libcouchbase/ext/libcouchbase/respfts'
|
68
|
+
autoload :FTSHANDLE, 'libcouchbase/ext/libcouchbase/ftshandle'
|
69
|
+
autoload :CMDFTS, 'libcouchbase/ext/libcouchbase/cmdfts'
|
70
|
+
|
71
|
+
attach_function :create_io_ops, :lcb_create_io_ops, [:pointer, :pointer], ErrorT
|
72
|
+
|
73
|
+
# (Not documented)
|
74
|
+
#
|
75
|
+
# @method `callback_errmap_callback`(error_t, instance)
|
76
|
+
# @param [T] error_t
|
77
|
+
# @param [Integer] instance
|
78
|
+
# @return [ErrorT]
|
79
|
+
# @scope class
|
80
|
+
#
|
81
|
+
callback :errmap_callback, [T.by_ref, :ushort], ErrorT
|
82
|
+
|
83
|
+
# (Not documented)
|
84
|
+
#
|
85
|
+
# @method `callback_bootstrap_callback`(instance, err)
|
86
|
+
# @param [T] instance
|
87
|
+
# @param [ErrorT] err
|
88
|
+
# @return [nil]
|
89
|
+
# @scope class
|
90
|
+
#
|
91
|
+
callback :bootstrap_callback, [T.by_ref, ErrorT], :void
|
92
|
+
|
93
|
+
# (Not documented)
|
94
|
+
#
|
95
|
+
# @method `callback_respcallback`(instance, cbtype, resp)
|
96
|
+
# @param [T] instance
|
97
|
+
# @param [Integer] cbtype
|
98
|
+
# @param [RESPBASE] resp
|
99
|
+
# @return [nil]
|
100
|
+
# @scope class
|
101
|
+
#
|
102
|
+
callback :respcallback, [T.by_ref, :int, RESPBASE.by_ref], :void
|
103
|
+
|
104
|
+
# (Not documented)
|
105
|
+
#
|
106
|
+
# @method `callback_destroy_callback`(cookie)
|
107
|
+
# @param [FFI::Pointer(*Void)] cookie
|
108
|
+
# @return [nil]
|
109
|
+
# @scope class
|
110
|
+
#
|
111
|
+
callback :destroy_callback, [:pointer], :void
|
112
|
+
|
113
|
+
# (Not documented)
|
114
|
+
#
|
115
|
+
# @method `callback_timings_callback`(instance, cookie, timeunit, min, max, total, maxtotal)
|
116
|
+
# @param [T] instance
|
117
|
+
# @param [FFI::Pointer(*Void)] cookie
|
118
|
+
# @param [TimeunitT] timeunit
|
119
|
+
# @param [Integer] min
|
120
|
+
# @param [Integer] max
|
121
|
+
# @param [Integer] total
|
122
|
+
# @param [Integer] maxtotal
|
123
|
+
# @return [nil]
|
124
|
+
# @scope class
|
125
|
+
#
|
126
|
+
callback :timings_callback, [T.by_ref, :pointer, TimeunitT, :uint, :uint, :uint, :uint], :void
|
127
|
+
|
128
|
+
# (Not documented)
|
129
|
+
#
|
130
|
+
# @method `callback_histogram_callback`(cookie, timeunit, min, max, total, maxtotal)
|
131
|
+
# @param [FFI::Pointer(*Void)] cookie
|
132
|
+
# @param [TimeunitT] timeunit
|
133
|
+
# @param [Integer] min
|
134
|
+
# @param [Integer] max
|
135
|
+
# @param [Integer] total
|
136
|
+
# @param [Integer] maxtotal
|
137
|
+
# @return [nil]
|
138
|
+
# @scope class
|
139
|
+
#
|
140
|
+
callback :histogram_callback, [:pointer, TimeunitT, :uint, :uint, :uint, :uint], :void
|
141
|
+
|
142
|
+
# (Not documented)
|
143
|
+
#
|
144
|
+
# @method `callback_viewquerycallback`(instance, cbtype, row)
|
145
|
+
# @param [T] instance
|
146
|
+
# @param [Integer] cbtype
|
147
|
+
# @param [RESPVIEWQUERY] row
|
148
|
+
# @return [nil]
|
149
|
+
# @scope class
|
150
|
+
#
|
151
|
+
callback :viewquerycallback, [T.by_ref, :int, RESPVIEWQUERY.by_ref], :void
|
152
|
+
|
153
|
+
# (Not documented)
|
154
|
+
#
|
155
|
+
# @method `callback_n1qlcallback`(, , )
|
156
|
+
# @param [T]
|
157
|
+
# @param [Integer]
|
158
|
+
# @param [RESPN1QL]
|
159
|
+
# @return [nil]
|
160
|
+
# @scope class
|
161
|
+
#
|
162
|
+
callback :n1qlcallback, [T.by_ref, :int, RESPN1QL.by_ref], :void
|
163
|
+
|
164
|
+
# (Not documented)
|
165
|
+
#
|
166
|
+
# @method `callback_ftscallback`(, , )
|
167
|
+
# @param [T]
|
168
|
+
# @param [Integer]
|
169
|
+
# @param [RESPFTS]
|
170
|
+
# @return [nil]
|
171
|
+
# @scope class
|
172
|
+
#
|
173
|
+
callback :ftscallback, [T.by_ref, :int, RESPFTS.by_ref], :void
|
174
|
+
|
175
|
+
# (Not documented)
|
176
|
+
#
|
177
|
+
# @method get_errtype(err)
|
178
|
+
# @param [ErrorT] err
|
179
|
+
# @return [Integer]
|
180
|
+
# @scope class
|
181
|
+
#
|
182
|
+
attach_function :get_errtype, :lcb_get_errtype, [ErrorT], :int
|
183
|
+
|
184
|
+
# (Not documented)
|
185
|
+
#
|
186
|
+
# @method strerror(instance, error)
|
187
|
+
# @param [T] instance
|
188
|
+
# @param [ErrorT] error
|
189
|
+
# @return [String]
|
190
|
+
# @scope class
|
191
|
+
#
|
192
|
+
attach_function :strerror, :lcb_strerror, [T.by_ref, ErrorT], :string
|
193
|
+
|
194
|
+
# (Not documented)
|
195
|
+
#
|
196
|
+
# @method errmap_default(instance, code)
|
197
|
+
# @param [T] instance
|
198
|
+
# @param [Integer] code
|
199
|
+
# @return [ErrorT]
|
200
|
+
# @scope class
|
201
|
+
#
|
202
|
+
attach_function :errmap_default, :lcb_errmap_default, [T.by_ref, :ushort], ErrorT
|
203
|
+
|
204
|
+
# (Not documented)
|
205
|
+
#
|
206
|
+
# @method set_errmap_callback(t, errmap_callback)
|
207
|
+
# @param [T] t
|
208
|
+
# @param [Proc(callback_errmap_callback)] errmap_callback
|
209
|
+
# @return [Proc(callback_errmap_callback)]
|
210
|
+
# @scope class
|
211
|
+
#
|
212
|
+
attach_function :set_errmap_callback, :lcb_set_errmap_callback, [T.by_ref, :errmap_callback], :errmap_callback
|
213
|
+
|
214
|
+
# (Not documented)
|
215
|
+
#
|
216
|
+
# @method create(instance, options)
|
217
|
+
# @param [FFI::Pointer(*T)] instance
|
218
|
+
# @param [CreateSt] options
|
219
|
+
# @return [ErrorT]
|
220
|
+
# @scope class
|
221
|
+
#
|
222
|
+
attach_function :create, :lcb_create, [:pointer, CreateSt.by_ref], ErrorT, :blocking => true
|
223
|
+
|
224
|
+
# (Not documented)
|
225
|
+
#
|
226
|
+
# @method connect(instance)
|
227
|
+
# @param [T] instance
|
228
|
+
# @return [ErrorT]
|
229
|
+
# @scope class
|
230
|
+
#
|
231
|
+
attach_function :connect, :lcb_connect, [T.by_ref], ErrorT, :blocking => true
|
232
|
+
|
233
|
+
# (Not documented)
|
234
|
+
#
|
235
|
+
# @method set_bootstrap_callback(instance, callback)
|
236
|
+
# @param [T] instance
|
237
|
+
# @param [Proc(callback_bootstrap_callback)] callback
|
238
|
+
# @return [Proc(callback_bootstrap_callback)]
|
239
|
+
# @scope class
|
240
|
+
#
|
241
|
+
attach_function :set_bootstrap_callback, :lcb_set_bootstrap_callback, [T.by_ref, :bootstrap_callback], :bootstrap_callback
|
242
|
+
|
243
|
+
# (Not documented)
|
244
|
+
#
|
245
|
+
# @method get_bootstrap_status(instance)
|
246
|
+
# @param [T] instance
|
247
|
+
# @return [ErrorT]
|
248
|
+
# @scope class
|
249
|
+
#
|
250
|
+
attach_function :get_bootstrap_status, :lcb_get_bootstrap_status, [T.by_ref], ErrorT
|
251
|
+
|
252
|
+
# (Not documented)
|
253
|
+
#
|
254
|
+
# @method install_callback3(instance, cbtype, cb)
|
255
|
+
# @param [T] instance
|
256
|
+
# @param [Integer] cbtype
|
257
|
+
# @param [Proc(callback_respcallback)] cb
|
258
|
+
# @return [Proc(callback_respcallback)]
|
259
|
+
# @scope class
|
260
|
+
#
|
261
|
+
attach_function :install_callback3, :lcb_install_callback3, [T.by_ref, :int, :respcallback], :respcallback
|
262
|
+
|
263
|
+
# (Not documented)
|
264
|
+
#
|
265
|
+
# @method get_callback3(instance, cbtype)
|
266
|
+
# @param [T] instance
|
267
|
+
# @param [Integer] cbtype
|
268
|
+
# @return [Proc(callback_respcallback)]
|
269
|
+
# @scope class
|
270
|
+
#
|
271
|
+
attach_function :get_callback3, :lcb_get_callback3, [T.by_ref, :int], :respcallback
|
272
|
+
|
273
|
+
# (Not documented)
|
274
|
+
#
|
275
|
+
# @method strcbtype(cbtype)
|
276
|
+
# @param [Integer] cbtype
|
277
|
+
# @return [String]
|
278
|
+
# @scope class
|
279
|
+
#
|
280
|
+
attach_function :strcbtype, :lcb_strcbtype, [:int], :string
|
281
|
+
|
282
|
+
# (Not documented)
|
283
|
+
#
|
284
|
+
# @method get3(instance, cookie, cmd)
|
285
|
+
# @param [T] instance
|
286
|
+
# @param [FFI::Pointer(*Void)] cookie
|
287
|
+
# @param [CMDGET] cmd
|
288
|
+
# @return [ErrorT]
|
289
|
+
# @scope class
|
290
|
+
#
|
291
|
+
attach_function :get3, :lcb_get3, [T.by_ref, :pointer, CMDGET.by_ref], ErrorT, :blocking => true
|
292
|
+
|
293
|
+
# (Not documented)
|
294
|
+
#
|
295
|
+
# @method rget3(instance, cookie, cmd)
|
296
|
+
# @param [T] instance
|
297
|
+
# @param [FFI::Pointer(*Void)] cookie
|
298
|
+
# @param [CMDGETREPLICA] cmd
|
299
|
+
# @return [ErrorT]
|
300
|
+
# @scope class
|
301
|
+
#
|
302
|
+
attach_function :rget3, :lcb_rget3, [T.by_ref, :pointer, CMDGETREPLICA.by_ref], ErrorT, :blocking => true
|
303
|
+
|
304
|
+
# (Not documented)
|
305
|
+
#
|
306
|
+
# @method store3(instance, cookie, cmd)
|
307
|
+
# @param [T] instance
|
308
|
+
# @param [FFI::Pointer(*Void)] cookie
|
309
|
+
# @param [CMDSTORE] cmd
|
310
|
+
# @return [ErrorT]
|
311
|
+
# @scope class
|
312
|
+
#
|
313
|
+
attach_function :store3, :lcb_store3, [T.by_ref, :pointer, CMDSTORE.by_ref], ErrorT, :blocking => true
|
314
|
+
|
315
|
+
# (Not documented)
|
316
|
+
#
|
317
|
+
# @method remove3(instance, cookie, cmd)
|
318
|
+
# @param [T] instance
|
319
|
+
# @param [FFI::Pointer(*Void)] cookie
|
320
|
+
# @param [CMDBASE] cmd
|
321
|
+
# @return [ErrorT]
|
322
|
+
# @scope class
|
323
|
+
#
|
324
|
+
attach_function :remove3, :lcb_remove3, [T.by_ref, :pointer, CMDBASE.by_ref], ErrorT, :blocking => true
|
325
|
+
|
326
|
+
# (Not documented)
|
327
|
+
#
|
328
|
+
# @method endure3_ctxnew(instance, options, err)
|
329
|
+
# @param [T] instance
|
330
|
+
# @param [DurabilityOptsT] options
|
331
|
+
# @param [FFI::Pointer(*ErrorT)] err
|
332
|
+
# @return [MULTICMDCTX]
|
333
|
+
# @scope class
|
334
|
+
#
|
335
|
+
attach_function :endure3_ctxnew, :lcb_endure3_ctxnew, [T.by_ref, DurabilityOptsT.by_ref, :pointer], MULTICMDCTX.by_ref, :blocking => true
|
336
|
+
|
337
|
+
# (Not documented)
|
338
|
+
#
|
339
|
+
# @method storedur3(instance, cookie, cmd)
|
340
|
+
# @param [T] instance
|
341
|
+
# @param [FFI::Pointer(*Void)] cookie
|
342
|
+
# @param [CMDSTOREDUR] cmd
|
343
|
+
# @return [ErrorT]
|
344
|
+
# @scope class
|
345
|
+
#
|
346
|
+
attach_function :storedur3, :lcb_storedur3, [T.by_ref, :pointer, CMDSTOREDUR.by_ref], ErrorT, :blocking => true
|
347
|
+
|
348
|
+
# (Not documented)
|
349
|
+
#
|
350
|
+
# @method durability_validate(instance, persist_to, replicate_to, options)
|
351
|
+
# @param [T] instance
|
352
|
+
# @param [FFI::Pointer(*U16)] persist_to
|
353
|
+
# @param [FFI::Pointer(*U16)] replicate_to
|
354
|
+
# @param [Integer] options
|
355
|
+
# @return [ErrorT]
|
356
|
+
# @scope class
|
357
|
+
#
|
358
|
+
attach_function :durability_validate, :lcb_durability_validate, [T.by_ref, :pointer, :pointer, :int], ErrorT, :blocking => true
|
359
|
+
|
360
|
+
# (Not documented)
|
361
|
+
#
|
362
|
+
# @method observe3_ctxnew(instance)
|
363
|
+
# @param [T] instance
|
364
|
+
# @return [MULTICMDCTX]
|
365
|
+
# @scope class
|
366
|
+
#
|
367
|
+
attach_function :observe3_ctxnew, :lcb_observe3_ctxnew, [T.by_ref], MULTICMDCTX.by_ref, :blocking => true
|
368
|
+
|
369
|
+
# (Not documented)
|
370
|
+
#
|
371
|
+
# @method observe_seqno3(instance, cookie, cmd)
|
372
|
+
# @param [T] instance
|
373
|
+
# @param [FFI::Pointer(*Void)] cookie
|
374
|
+
# @param [CMDOBSEQNO] cmd
|
375
|
+
# @return [ErrorT]
|
376
|
+
# @scope class
|
377
|
+
#
|
378
|
+
attach_function :observe_seqno3, :lcb_observe_seqno3, [T.by_ref, :pointer, CMDOBSEQNO.by_ref], ErrorT, :blocking => true
|
379
|
+
|
380
|
+
# (Not documented)
|
381
|
+
#
|
382
|
+
# @method resp_get_mutation_token(cbtype, rb)
|
383
|
+
# @param [Integer] cbtype
|
384
|
+
# @param [RESPBASE] rb
|
385
|
+
# @return [MUTATIONTOKEN]
|
386
|
+
# @scope class
|
387
|
+
#
|
388
|
+
attach_function :resp_get_mutation_token, :lcb_resp_get_mutation_token, [:int, RESPBASE.by_ref], MUTATIONTOKEN.by_ref, :blocking => true
|
389
|
+
|
390
|
+
# (Not documented)
|
391
|
+
#
|
392
|
+
# @method get_mutation_token(instance, kb, errp)
|
393
|
+
# @param [T] instance
|
394
|
+
# @param [KEYBUF] kb
|
395
|
+
# @param [FFI::Pointer(*ErrorT)] errp
|
396
|
+
# @return [MUTATIONTOKEN]
|
397
|
+
# @scope class
|
398
|
+
#
|
399
|
+
attach_function :get_mutation_token, :lcb_get_mutation_token, [T.by_ref, KEYBUF.by_ref, :pointer], MUTATIONTOKEN.by_ref, :blocking => true
|
400
|
+
|
401
|
+
# (Not documented)
|
402
|
+
#
|
403
|
+
# @method counter3(instance, cookie, cmd)
|
404
|
+
# @param [T] instance
|
405
|
+
# @param [FFI::Pointer(*Void)] cookie
|
406
|
+
# @param [CMDCOUNTER] cmd
|
407
|
+
# @return [ErrorT]
|
408
|
+
# @scope class
|
409
|
+
#
|
410
|
+
attach_function :counter3, :lcb_counter3, [T.by_ref, :pointer, CMDCOUNTER.by_ref], ErrorT, :blocking => true
|
411
|
+
|
412
|
+
# (Not documented)
|
413
|
+
#
|
414
|
+
# @method unlock3(instance, cookie, cmd)
|
415
|
+
# @param [T] instance
|
416
|
+
# @param [FFI::Pointer(*Void)] cookie
|
417
|
+
# @param [CMDBASE] cmd
|
418
|
+
# @return [ErrorT]
|
419
|
+
# @scope class
|
420
|
+
#
|
421
|
+
attach_function :unlock3, :lcb_unlock3, [T.by_ref, :pointer, CMDBASE.by_ref], ErrorT, :blocking => true
|
422
|
+
|
423
|
+
# (Not documented)
|
424
|
+
#
|
425
|
+
# @method touch3(instance, cookie, cmd)
|
426
|
+
# @param [T] instance
|
427
|
+
# @param [FFI::Pointer(*Void)] cookie
|
428
|
+
# @param [CMDBASE] cmd
|
429
|
+
# @return [ErrorT]
|
430
|
+
# @scope class
|
431
|
+
#
|
432
|
+
attach_function :touch3, :lcb_touch3, [T.by_ref, :pointer, CMDBASE.by_ref], ErrorT, :blocking => true
|
433
|
+
|
434
|
+
# (Not documented)
|
435
|
+
#
|
436
|
+
# @method stats3(instance, cookie, cmd)
|
437
|
+
# @param [T] instance
|
438
|
+
# @param [FFI::Pointer(*Void)] cookie
|
439
|
+
# @param [CMDBASE] cmd
|
440
|
+
# @return [ErrorT]
|
441
|
+
# @scope class
|
442
|
+
#
|
443
|
+
attach_function :stats3, :lcb_stats3, [T.by_ref, :pointer, CMDBASE.by_ref], ErrorT, :blocking => true
|
444
|
+
|
445
|
+
# (Not documented)
|
446
|
+
#
|
447
|
+
# @method server_versions3(instance, cookie, cmd)
|
448
|
+
# @param [T] instance
|
449
|
+
# @param [FFI::Pointer(*Void)] cookie
|
450
|
+
# @param [CMDBASE] cmd
|
451
|
+
# @return [ErrorT]
|
452
|
+
# @scope class
|
453
|
+
#
|
454
|
+
attach_function :server_versions3, :lcb_server_versions3, [T.by_ref, :pointer, CMDBASE.by_ref], ErrorT, :blocking => true
|
455
|
+
|
456
|
+
# (Not documented)
|
457
|
+
#
|
458
|
+
# @method server_verbosity3(instance, cookie, cmd)
|
459
|
+
# @param [T] instance
|
460
|
+
# @param [FFI::Pointer(*Void)] cookie
|
461
|
+
# @param [CMDVERBOSITY] cmd
|
462
|
+
# @return [ErrorT]
|
463
|
+
# @scope class
|
464
|
+
#
|
465
|
+
attach_function :server_verbosity3, :lcb_server_verbosity3, [T.by_ref, :pointer, CMDVERBOSITY.by_ref], ErrorT, :blocking => true
|
466
|
+
|
467
|
+
# (Not documented)
|
468
|
+
#
|
469
|
+
# @method cbflush3(instance, cookie, cmd)
|
470
|
+
# @param [T] instance
|
471
|
+
# @param [FFI::Pointer(*Void)] cookie
|
472
|
+
# @param [CMDBASE] cmd
|
473
|
+
# @return [ErrorT]
|
474
|
+
# @scope class
|
475
|
+
#
|
476
|
+
attach_function :cbflush3, :lcb_cbflush3, [T.by_ref, :pointer, CMDBASE.by_ref], ErrorT, :blocking => true
|
477
|
+
|
478
|
+
# (Not documented)
|
479
|
+
#
|
480
|
+
# @method flush3(instance, cookie, cmd)
|
481
|
+
# @param [T] instance
|
482
|
+
# @param [FFI::Pointer(*Void)] cookie
|
483
|
+
# @param [CMDBASE] cmd
|
484
|
+
# @return [ErrorT]
|
485
|
+
# @scope class
|
486
|
+
#
|
487
|
+
attach_function :flush3, :lcb_flush3, [T.by_ref, :pointer, CMDBASE.by_ref], ErrorT, :blocking => true
|
488
|
+
|
489
|
+
# (Not documented)
|
490
|
+
#
|
491
|
+
# @method http3(instance, cookie, cmd)
|
492
|
+
# @param [T] instance
|
493
|
+
# @param [FFI::Pointer(*Void)] cookie
|
494
|
+
# @param [CMDHTTP] cmd
|
495
|
+
# @return [ErrorT]
|
496
|
+
# @scope class
|
497
|
+
#
|
498
|
+
attach_function :http3, :lcb_http3, [T.by_ref, :pointer, CMDHTTP.by_ref], ErrorT, :blocking => true
|
499
|
+
|
500
|
+
# (Not documented)
|
501
|
+
#
|
502
|
+
# @method cancel_http_request(instance, request)
|
503
|
+
# @param [T] instance
|
504
|
+
# @param [HttpRequestT] request
|
505
|
+
# @return [nil]
|
506
|
+
# @scope class
|
507
|
+
#
|
508
|
+
attach_function :cancel_http_request, :lcb_cancel_http_request, [T.by_ref, HttpRequestT.by_ref], :void, :blocking => true
|
509
|
+
|
510
|
+
# (Not documented)
|
511
|
+
#
|
512
|
+
# @method set_cookie(instance, cookie)
|
513
|
+
# @param [T] instance
|
514
|
+
# @param [FFI::Pointer(*Void)] cookie
|
515
|
+
# @return [nil]
|
516
|
+
# @scope class
|
517
|
+
#
|
518
|
+
attach_function :set_cookie, :lcb_set_cookie, [T.by_ref, :pointer], :void
|
519
|
+
|
520
|
+
# (Not documented)
|
521
|
+
#
|
522
|
+
# @method get_cookie(instance)
|
523
|
+
# @param [T] instance
|
524
|
+
# @return [FFI::Pointer(*Void)]
|
525
|
+
# @scope class
|
526
|
+
#
|
527
|
+
attach_function :get_cookie, :lcb_get_cookie, [T.by_ref], :pointer
|
528
|
+
|
529
|
+
# (Not documented)
|
530
|
+
#
|
531
|
+
# @method wait(instance)
|
532
|
+
# @param [T] instance
|
533
|
+
# @return [ErrorT]
|
534
|
+
# @scope class
|
535
|
+
#
|
536
|
+
attach_function :wait, :lcb_wait, [T.by_ref], ErrorT, :blocking => true
|
537
|
+
|
538
|
+
# (Not documented)
|
539
|
+
#
|
540
|
+
# @method tick_nowait(instance)
|
541
|
+
# @param [T] instance
|
542
|
+
# @return [ErrorT]
|
543
|
+
# @scope class
|
544
|
+
#
|
545
|
+
attach_function :tick_nowait, :lcb_tick_nowait, [T.by_ref], ErrorT, :blocking => true
|
546
|
+
|
547
|
+
# (Not documented)
|
548
|
+
#
|
549
|
+
# @method wait3(instance, flags)
|
550
|
+
# @param [T] instance
|
551
|
+
# @param [WAITFLAGS] flags
|
552
|
+
# @return [nil]
|
553
|
+
# @scope class
|
554
|
+
#
|
555
|
+
attach_function :wait3, :lcb_wait3, [T.by_ref, WAITFLAGS], :void, :blocking => true
|
556
|
+
|
557
|
+
# (Not documented)
|
558
|
+
#
|
559
|
+
# @method breakout(instance)
|
560
|
+
# @param [T] instance
|
561
|
+
# @return [nil]
|
562
|
+
# @scope class
|
563
|
+
#
|
564
|
+
attach_function :breakout, :lcb_breakout, [T.by_ref], :void, :blocking => true
|
565
|
+
|
566
|
+
# (Not documented)
|
567
|
+
#
|
568
|
+
# @method is_waiting(instance)
|
569
|
+
# @param [T] instance
|
570
|
+
# @return [Integer]
|
571
|
+
# @scope class
|
572
|
+
#
|
573
|
+
attach_function :is_waiting, :lcb_is_waiting, [T.by_ref], :int, :blocking => true
|
574
|
+
|
575
|
+
# (Not documented)
|
576
|
+
#
|
577
|
+
# @method refresh_config(instance)
|
578
|
+
# @param [T] instance
|
579
|
+
# @return [nil]
|
580
|
+
# @scope class
|
581
|
+
#
|
582
|
+
attach_function :refresh_config, :lcb_refresh_config, [T.by_ref], :void, :blocking => true
|
583
|
+
|
584
|
+
# (Not documented)
|
585
|
+
#
|
586
|
+
# @method sched_enter(instance)
|
587
|
+
# @param [T] instance
|
588
|
+
# @return [nil]
|
589
|
+
# @scope class
|
590
|
+
#
|
591
|
+
attach_function :sched_enter, :lcb_sched_enter, [T.by_ref], :void, :blocking => true
|
592
|
+
|
593
|
+
# (Not documented)
|
594
|
+
#
|
595
|
+
# @method sched_leave(instance)
|
596
|
+
# @param [T] instance
|
597
|
+
# @return [nil]
|
598
|
+
# @scope class
|
599
|
+
#
|
600
|
+
attach_function :sched_leave, :lcb_sched_leave, [T.by_ref], :void, :blocking => true
|
601
|
+
|
602
|
+
# (Not documented)
|
603
|
+
#
|
604
|
+
# @method sched_fail(instance)
|
605
|
+
# @param [T] instance
|
606
|
+
# @return [nil]
|
607
|
+
# @scope class
|
608
|
+
#
|
609
|
+
attach_function :sched_fail, :lcb_sched_fail, [T.by_ref], :void, :blocking => true
|
610
|
+
|
611
|
+
# (Not documented)
|
612
|
+
#
|
613
|
+
# @method sched_flush(instance)
|
614
|
+
# @param [T] instance
|
615
|
+
# @return [nil]
|
616
|
+
# @scope class
|
617
|
+
#
|
618
|
+
attach_function :sched_flush, :lcb_sched_flush, [T.by_ref], :void, :blocking => true
|
619
|
+
|
620
|
+
# (Not documented)
|
621
|
+
#
|
622
|
+
# @method destroy(instance)
|
623
|
+
# @param [T] instance
|
624
|
+
# @return [nil]
|
625
|
+
# @scope class
|
626
|
+
#
|
627
|
+
attach_function :destroy, :lcb_destroy, [T.by_ref], :void, :blocking => true
|
628
|
+
|
629
|
+
# (Not documented)
|
630
|
+
#
|
631
|
+
# @method set_destroy_callback(t, destroy_callback)
|
632
|
+
# @param [T] t
|
633
|
+
# @param [Proc(callback_destroy_callback)] destroy_callback
|
634
|
+
# @return [Proc(callback_destroy_callback)]
|
635
|
+
# @scope class
|
636
|
+
#
|
637
|
+
attach_function :set_destroy_callback, :lcb_set_destroy_callback, [T.by_ref, :destroy_callback], :destroy_callback
|
638
|
+
|
639
|
+
# (Not documented)
|
640
|
+
#
|
641
|
+
# @method destroy_async(instance, arg)
|
642
|
+
# @param [T] instance
|
643
|
+
# @param [FFI::Pointer(*Void)] arg
|
644
|
+
# @return [nil]
|
645
|
+
# @scope class
|
646
|
+
#
|
647
|
+
attach_function :destroy_async, :lcb_destroy_async, [T.by_ref, :pointer], :void, :blocking => true
|
648
|
+
|
649
|
+
# (Not documented)
|
650
|
+
#
|
651
|
+
# @method get_node(instance, type, index)
|
652
|
+
# @param [T] instance
|
653
|
+
# @param [GETNODETYPE] type
|
654
|
+
# @param [Integer] index
|
655
|
+
# @return [String]
|
656
|
+
# @scope class
|
657
|
+
#
|
658
|
+
attach_function :get_node, :lcb_get_node, [T.by_ref, GETNODETYPE, :uint], :string, :blocking => true
|
659
|
+
|
660
|
+
# (Not documented)
|
661
|
+
#
|
662
|
+
# @method get_keynode(instance, key, nkey)
|
663
|
+
# @param [T] instance
|
664
|
+
# @param [FFI::Pointer(*Void)] key
|
665
|
+
# @param [Integer] nkey
|
666
|
+
# @return [String]
|
667
|
+
# @scope class
|
668
|
+
#
|
669
|
+
attach_function :get_keynode, :lcb_get_keynode, [T.by_ref, :pointer, :ulong], :string, :blocking => true
|
670
|
+
|
671
|
+
# (Not documented)
|
672
|
+
#
|
673
|
+
# @method get_num_replicas(instance)
|
674
|
+
# @param [T] instance
|
675
|
+
# @return [Integer]
|
676
|
+
# @scope class
|
677
|
+
#
|
678
|
+
attach_function :get_num_replicas, :lcb_get_num_replicas, [T.by_ref], :int
|
679
|
+
|
680
|
+
# (Not documented)
|
681
|
+
#
|
682
|
+
# @method get_num_nodes(instance)
|
683
|
+
# @param [T] instance
|
684
|
+
# @return [Integer]
|
685
|
+
# @scope class
|
686
|
+
#
|
687
|
+
attach_function :get_num_nodes, :lcb_get_num_nodes, [T.by_ref], :int
|
688
|
+
|
689
|
+
# (Not documented)
|
690
|
+
#
|
691
|
+
# @method get_server_list(instance)
|
692
|
+
# @param [T] instance
|
693
|
+
# @return [FFI::Pointer(**CharS)]
|
694
|
+
# @scope class
|
695
|
+
#
|
696
|
+
attach_function :get_server_list, :lcb_get_server_list, [T.by_ref], :pointer, :blocking => true
|
697
|
+
|
698
|
+
# (Not documented)
|
699
|
+
#
|
700
|
+
# @method dump(instance, fp, flags)
|
701
|
+
# @param [T] instance
|
702
|
+
# @param [FFI::Pointer(*FILE)] fp
|
703
|
+
# @param [Integer] flags
|
704
|
+
# @return [nil]
|
705
|
+
# @scope class
|
706
|
+
#
|
707
|
+
attach_function :dump, :lcb_dump, [T.by_ref, :pointer, :uint], :void, :blocking => true
|
708
|
+
|
709
|
+
# (Not documented)
|
710
|
+
#
|
711
|
+
# @method cntl(instance, mode, cmd, arg)
|
712
|
+
# @param [T] instance
|
713
|
+
# @param [Integer] mode
|
714
|
+
# @param [Integer] cmd
|
715
|
+
# @param [FFI::Pointer(*Void)] arg
|
716
|
+
# @return [ErrorT]
|
717
|
+
# @scope class
|
718
|
+
#
|
719
|
+
attach_function :cntl, :lcb_cntl, [T.by_ref, :int, :int, :pointer], ErrorT, :blocking => true
|
720
|
+
|
721
|
+
# (Not documented)
|
722
|
+
#
|
723
|
+
# @method cntl_string(instance, key, value)
|
724
|
+
# @param [T] instance
|
725
|
+
# @param [String] key
|
726
|
+
# @param [String] value
|
727
|
+
# @return [ErrorT]
|
728
|
+
# @scope class
|
729
|
+
#
|
730
|
+
attach_function :cntl_string, :lcb_cntl_string, [T.by_ref, :string, :string], ErrorT, :blocking => true
|
731
|
+
|
732
|
+
# (Not documented)
|
733
|
+
#
|
734
|
+
# @method cntl_setu32(instance, cmd, arg)
|
735
|
+
# @param [T] instance
|
736
|
+
# @param [Integer] cmd
|
737
|
+
# @param [Integer] arg
|
738
|
+
# @return [ErrorT]
|
739
|
+
# @scope class
|
740
|
+
#
|
741
|
+
attach_function :cntl_setu32, :lcb_cntl_setu32, [T.by_ref, :int, :uint], ErrorT, :blocking => true
|
742
|
+
|
743
|
+
# (Not documented)
|
744
|
+
#
|
745
|
+
# @method cntl_getu32(instance, cmd)
|
746
|
+
# @param [T] instance
|
747
|
+
# @param [Integer] cmd
|
748
|
+
# @return [Integer]
|
749
|
+
# @scope class
|
750
|
+
#
|
751
|
+
attach_function :cntl_getu32, :lcb_cntl_getu32, [T.by_ref, :int], :uint, :blocking => true
|
752
|
+
|
753
|
+
# (Not documented)
|
754
|
+
#
|
755
|
+
# @method cntl_exists(ctl)
|
756
|
+
# @param [Integer] ctl
|
757
|
+
# @return [Integer]
|
758
|
+
# @scope class
|
759
|
+
#
|
760
|
+
attach_function :cntl_exists, :lcb_cntl_exists, [:int], :int, :blocking => true
|
761
|
+
|
762
|
+
# (Not documented)
|
763
|
+
#
|
764
|
+
# @method enable_timings(instance)
|
765
|
+
# @param [T] instance
|
766
|
+
# @return [ErrorT]
|
767
|
+
# @scope class
|
768
|
+
#
|
769
|
+
attach_function :enable_timings, :lcb_enable_timings, [T.by_ref], ErrorT, :blocking => true
|
770
|
+
|
771
|
+
# (Not documented)
|
772
|
+
#
|
773
|
+
# @method disable_timings(instance)
|
774
|
+
# @param [T] instance
|
775
|
+
# @return [ErrorT]
|
776
|
+
# @scope class
|
777
|
+
#
|
778
|
+
attach_function :disable_timings, :lcb_disable_timings, [T.by_ref], ErrorT, :blocking => true
|
779
|
+
|
780
|
+
# (Not documented)
|
781
|
+
#
|
782
|
+
# @method get_timings(instance, cookie, callback)
|
783
|
+
# @param [T] instance
|
784
|
+
# @param [FFI::Pointer(*Void)] cookie
|
785
|
+
# @param [Proc(callback_timings_callback)] callback
|
786
|
+
# @return [ErrorT]
|
787
|
+
# @scope class
|
788
|
+
#
|
789
|
+
attach_function :get_timings, :lcb_get_timings, [T.by_ref, :pointer, :timings_callback], ErrorT, :blocking => true
|
790
|
+
|
791
|
+
# (Not documented)
|
792
|
+
#
|
793
|
+
# @method get_version(version)
|
794
|
+
# @param [FFI::Pointer(*U32)] version
|
795
|
+
# @return [String]
|
796
|
+
# @scope class
|
797
|
+
#
|
798
|
+
attach_function :get_version, :lcb_get_version, [:pointer], :string, :blocking => true
|
799
|
+
|
800
|
+
# (Not documented)
|
801
|
+
#
|
802
|
+
# @method supports_feature(n)
|
803
|
+
# @param [Integer] n
|
804
|
+
# @return [Integer]
|
805
|
+
# @scope class
|
806
|
+
#
|
807
|
+
attach_function :supports_feature, :lcb_supports_feature, [:int], :int, :blocking => true
|
808
|
+
|
809
|
+
# (Not documented)
|
810
|
+
#
|
811
|
+
# @method mem_alloc(size)
|
812
|
+
# @param [Integer] size
|
813
|
+
# @return [FFI::Pointer(*Void)]
|
814
|
+
# @scope class
|
815
|
+
#
|
816
|
+
attach_function :mem_alloc, :lcb_mem_alloc, [:ulong], :pointer, :blocking => true
|
817
|
+
|
818
|
+
# (Not documented)
|
819
|
+
#
|
820
|
+
# @method mem_free(ptr)
|
821
|
+
# @param [FFI::Pointer(*Void)] ptr
|
822
|
+
# @return [nil]
|
823
|
+
# @scope class
|
824
|
+
#
|
825
|
+
attach_function :mem_free, :lcb_mem_free, [:pointer], :void, :blocking => true
|
826
|
+
|
827
|
+
# (Not documented)
|
828
|
+
#
|
829
|
+
# @method run_loop(instance)
|
830
|
+
# @param [T] instance
|
831
|
+
# @return [nil]
|
832
|
+
# @scope class
|
833
|
+
#
|
834
|
+
attach_function :run_loop, :lcb_run_loop, [T.by_ref], :void, :blocking => true
|
835
|
+
|
836
|
+
# (Not documented)
|
837
|
+
#
|
838
|
+
# @method stop_loop(instance)
|
839
|
+
# @param [T] instance
|
840
|
+
# @return [nil]
|
841
|
+
# @scope class
|
842
|
+
#
|
843
|
+
attach_function :stop_loop, :lcb_stop_loop, [T.by_ref], :void, :blocking => true
|
844
|
+
|
845
|
+
# (Not documented)
|
846
|
+
#
|
847
|
+
# @method nstime()
|
848
|
+
# @return [Integer]
|
849
|
+
# @scope class
|
850
|
+
#
|
851
|
+
attach_function :nstime, :lcb_nstime, [], :ulong_long, :blocking => true
|
852
|
+
|
853
|
+
# (Not documented)
|
854
|
+
#
|
855
|
+
# @method histogram_create()
|
856
|
+
# @return [HISTOGRAM]
|
857
|
+
# @scope class
|
858
|
+
#
|
859
|
+
attach_function :histogram_create, :lcb_histogram_create, [], HISTOGRAM.by_ref, :blocking => true
|
860
|
+
|
861
|
+
# (Not documented)
|
862
|
+
#
|
863
|
+
# @method histogram_destroy(hg)
|
864
|
+
# @param [HISTOGRAM] hg
|
865
|
+
# @return [nil]
|
866
|
+
# @scope class
|
867
|
+
#
|
868
|
+
attach_function :histogram_destroy, :lcb_histogram_destroy, [HISTOGRAM.by_ref], :void, :blocking => true
|
869
|
+
|
870
|
+
# (Not documented)
|
871
|
+
#
|
872
|
+
# @method histogram_record(hg, duration)
|
873
|
+
# @param [HISTOGRAM] hg
|
874
|
+
# @param [Integer] duration
|
875
|
+
# @return [nil]
|
876
|
+
# @scope class
|
877
|
+
#
|
878
|
+
attach_function :histogram_record, :lcb_histogram_record, [HISTOGRAM.by_ref, :ulong_long], :void, :blocking => true
|
879
|
+
|
880
|
+
# (Not documented)
|
881
|
+
#
|
882
|
+
# @method histogram_read(hg, cookie, cb)
|
883
|
+
# @param [HISTOGRAM] hg
|
884
|
+
# @param [FFI::Pointer(*Void)] cookie
|
885
|
+
# @param [Proc(callback_histogram_callback)] cb
|
886
|
+
# @return [nil]
|
887
|
+
# @scope class
|
888
|
+
#
|
889
|
+
attach_function :histogram_read, :lcb_histogram_read, [HISTOGRAM.by_ref, :pointer, :histogram_callback], :void, :blocking => true
|
890
|
+
|
891
|
+
# (Not documented)
|
892
|
+
#
|
893
|
+
# @method histogram_print(hg, stream)
|
894
|
+
# @param [HISTOGRAM] hg
|
895
|
+
# @param [FFI::Pointer(*FILE)] stream
|
896
|
+
# @return [nil]
|
897
|
+
# @scope class
|
898
|
+
#
|
899
|
+
attach_function :histogram_print, :lcb_histogram_print, [HISTOGRAM.by_ref, :pointer], :void, :blocking => true
|
900
|
+
|
901
|
+
# (Not documented)
|
902
|
+
#
|
903
|
+
# @method subdoc3(instance, cookie, cmd)
|
904
|
+
# @param [T] instance
|
905
|
+
# @param [FFI::Pointer(*Void)] cookie
|
906
|
+
# @param [CMDSUBDOC] cmd
|
907
|
+
# @return [ErrorT]
|
908
|
+
# @scope class
|
909
|
+
#
|
910
|
+
attach_function :subdoc3, :lcb_subdoc3, [T.by_ref, :pointer, CMDSUBDOC.by_ref], ErrorT, :blocking => true
|
911
|
+
|
912
|
+
# (Not documented)
|
913
|
+
#
|
914
|
+
# @method sdresult_next(resp, out, iter)
|
915
|
+
# @param [RESPSUBDOC] resp
|
916
|
+
# @param [SDENTRY] out
|
917
|
+
# @param [FFI::Pointer(*SizeT)] iter
|
918
|
+
# @return [Integer]
|
919
|
+
# @scope class
|
920
|
+
#
|
921
|
+
attach_function :sdresult_next, :lcb_sdresult_next, [RESPSUBDOC.by_ref, SDENTRY.by_ref, :pointer], :int, :blocking => true
|
922
|
+
|
923
|
+
# (Not documented)
|
924
|
+
#
|
925
|
+
# @method view_query(instance, cookie, cmd)
|
926
|
+
# @param [T] instance
|
927
|
+
# @param [FFI::Pointer(*Void)] cookie
|
928
|
+
# @param [CMDVIEWQUERY] cmd
|
929
|
+
# @return [ErrorT]
|
930
|
+
# @scope class
|
931
|
+
#
|
932
|
+
attach_function :view_query, :lcb_view_query, [T.by_ref, :pointer, CMDVIEWQUERY.by_ref], ErrorT, :blocking => true
|
933
|
+
|
934
|
+
# (Not documented)
|
935
|
+
#
|
936
|
+
# @method view_query_initcmd(vq, design, view, options, callback)
|
937
|
+
# @param [CMDVIEWQUERY] vq
|
938
|
+
# @param [String] design
|
939
|
+
# @param [String] view
|
940
|
+
# @param [String] options
|
941
|
+
# @param [Proc(callback_viewquerycallback)] callback
|
942
|
+
# @return [nil]
|
943
|
+
# @scope class
|
944
|
+
#
|
945
|
+
attach_function :view_query_initcmd, :lcb_view_query_initcmd, [CMDVIEWQUERY.by_ref, :string, :string, :string, :viewquerycallback], :void
|
946
|
+
|
947
|
+
# (Not documented)
|
948
|
+
#
|
949
|
+
# @method view_cancel(instance, handle)
|
950
|
+
# @param [T] instance
|
951
|
+
# @param [VIEWHANDLE] handle
|
952
|
+
# @return [nil]
|
953
|
+
# @scope class
|
954
|
+
#
|
955
|
+
attach_function :view_cancel, :lcb_view_cancel, [T.by_ref, VIEWHANDLE.by_ref], :void, :blocking => true
|
956
|
+
|
957
|
+
# (Not documented)
|
958
|
+
#
|
959
|
+
# @method n1p_new()
|
960
|
+
# @return [N1QLPARAMS]
|
961
|
+
# @scope class
|
962
|
+
#
|
963
|
+
attach_function :n1p_new, :lcb_n1p_new, [], N1QLPARAMS.by_ref
|
964
|
+
|
965
|
+
# (Not documented)
|
966
|
+
#
|
967
|
+
# @method n1p_reset(params)
|
968
|
+
# @param [N1QLPARAMS] params
|
969
|
+
# @return [nil]
|
970
|
+
# @scope class
|
971
|
+
#
|
972
|
+
attach_function :n1p_reset, :lcb_n1p_reset, [N1QLPARAMS.by_ref], :void
|
973
|
+
|
974
|
+
# (Not documented)
|
975
|
+
#
|
976
|
+
# @method n1p_free(params)
|
977
|
+
# @param [N1QLPARAMS] params
|
978
|
+
# @return [nil]
|
979
|
+
# @scope class
|
980
|
+
#
|
981
|
+
attach_function :n1p_free, :lcb_n1p_free, [N1QLPARAMS.by_ref], :void
|
982
|
+
|
983
|
+
# (Not documented)
|
984
|
+
#
|
985
|
+
# @method n1p_setquery(params, qstr, nqstr, type)
|
986
|
+
# @param [N1QLPARAMS] params
|
987
|
+
# @param [String] qstr
|
988
|
+
# @param [Integer] nqstr
|
989
|
+
# @param [Integer] type
|
990
|
+
# @return [ErrorT]
|
991
|
+
# @scope class
|
992
|
+
#
|
993
|
+
attach_function :n1p_setquery, :lcb_n1p_setquery, [N1QLPARAMS.by_ref, :string, :ulong, :int], ErrorT
|
994
|
+
|
995
|
+
# (Not documented)
|
996
|
+
#
|
997
|
+
# @method n1p_namedparam(params, name, n_name, value, n_value)
|
998
|
+
# @param [N1QLPARAMS] params
|
999
|
+
# @param [String] name
|
1000
|
+
# @param [Integer] n_name
|
1001
|
+
# @param [String] value
|
1002
|
+
# @param [Integer] n_value
|
1003
|
+
# @return [ErrorT]
|
1004
|
+
# @scope class
|
1005
|
+
#
|
1006
|
+
attach_function :n1p_namedparam, :lcb_n1p_namedparam, [N1QLPARAMS.by_ref, :string, :ulong, :string, :ulong], ErrorT
|
1007
|
+
|
1008
|
+
# (Not documented)
|
1009
|
+
#
|
1010
|
+
# @method n1p_posparam(params, value, n_value)
|
1011
|
+
# @param [N1QLPARAMS] params
|
1012
|
+
# @param [String] value
|
1013
|
+
# @param [Integer] n_value
|
1014
|
+
# @return [ErrorT]
|
1015
|
+
# @scope class
|
1016
|
+
#
|
1017
|
+
attach_function :n1p_posparam, :lcb_n1p_posparam, [N1QLPARAMS.by_ref, :string, :ulong], ErrorT
|
1018
|
+
|
1019
|
+
# (Not documented)
|
1020
|
+
#
|
1021
|
+
# @method n1p_readonly(params, readonly)
|
1022
|
+
# @param [N1QLPARAMS] params
|
1023
|
+
# @param [Integer] readonly if non-zero, the query will be read-only
|
1024
|
+
# @return [ErrorT]
|
1025
|
+
# @scope class
|
1026
|
+
#
|
1027
|
+
attach_function :n1p_readonly, :lcb_n1p_readonly, [N1QLPARAMS.by_ref, :int], ErrorT
|
1028
|
+
|
1029
|
+
# (Not documented)
|
1030
|
+
#
|
1031
|
+
# @method n1p_readonly(params, readonly)
|
1032
|
+
# @param [N1QLPARAMS] params
|
1033
|
+
# @param [Integer] Sets maximum buffered channel size. Use 0 or a negative number to disable.
|
1034
|
+
# @return [ErrorT]
|
1035
|
+
# @scope class
|
1036
|
+
#
|
1037
|
+
attach_function :n1p_scancap, :lcb_n1p_scancap, [N1QLPARAMS.by_ref, :int], ErrorT
|
1038
|
+
|
1039
|
+
# (Not documented)
|
1040
|
+
#
|
1041
|
+
# @method n1p_readonly(params, readonly)
|
1042
|
+
# @param [N1QLPARAMS] params
|
1043
|
+
# @param [Integer] maximum number of items each execution operator can buffer between operators.
|
1044
|
+
# @return [ErrorT]
|
1045
|
+
# @scope class
|
1046
|
+
#
|
1047
|
+
attach_function :n1p_pipelinecap, :lcb_n1p_pipelinecap, [N1QLPARAMS.by_ref, :int], ErrorT
|
1048
|
+
|
1049
|
+
# (Not documented)
|
1050
|
+
#
|
1051
|
+
# @method n1p_readonly(params, readonly)
|
1052
|
+
# @param [N1QLPARAMS] params
|
1053
|
+
# @param [Integer] number of items execution operators can batch for fetch from the KV
|
1054
|
+
# @return [ErrorT]
|
1055
|
+
# @scope class
|
1056
|
+
#
|
1057
|
+
attach_function :n1p_pipelinebatch, :lcb_n1p_pipelinebatch, [N1QLPARAMS.by_ref, :int], ErrorT
|
1058
|
+
|
1059
|
+
# (Not documented)
|
1060
|
+
#
|
1061
|
+
# @method n1p_setopt(params, name, n_name, value, n_value)
|
1062
|
+
# @param [N1QLPARAMS] params
|
1063
|
+
# @param [String] name
|
1064
|
+
# @param [Integer] n_name
|
1065
|
+
# @param [String] value
|
1066
|
+
# @param [Integer] n_value
|
1067
|
+
# @return [ErrorT]
|
1068
|
+
# @scope class
|
1069
|
+
#
|
1070
|
+
attach_function :n1p_setopt, :lcb_n1p_setopt, [N1QLPARAMS.by_ref, :string, :ulong, :string, :ulong], ErrorT
|
1071
|
+
|
1072
|
+
# (Not documented)
|
1073
|
+
#
|
1074
|
+
# @method n1p_setconsistency(params, mode)
|
1075
|
+
# @param [N1QLPARAMS] params
|
1076
|
+
# @param [Integer] mode
|
1077
|
+
# @return [ErrorT]
|
1078
|
+
# @scope class
|
1079
|
+
#
|
1080
|
+
attach_function :n1p_setconsistency, :lcb_n1p_setconsistency, [N1QLPARAMS.by_ref, :int], ErrorT
|
1081
|
+
|
1082
|
+
# (Not documented)
|
1083
|
+
#
|
1084
|
+
# @method n1p_setconsistent_token(params, keyspace, st)
|
1085
|
+
# @param [N1QLPARAMS] params
|
1086
|
+
# @param [String] keyspace
|
1087
|
+
# @param [MUTATIONTOKEN] st
|
1088
|
+
# @return [ErrorT]
|
1089
|
+
# @scope class
|
1090
|
+
#
|
1091
|
+
attach_function :n1p_setconsistent_token, :lcb_n1p_setconsistent_token, [N1QLPARAMS.by_ref, :string, MUTATIONTOKEN.by_ref], ErrorT
|
1092
|
+
|
1093
|
+
# (Not documented)
|
1094
|
+
#
|
1095
|
+
# @method n1p_setconsistent_handle(params, instance)
|
1096
|
+
# @param [N1QLPARAMS] params
|
1097
|
+
# @param [T] instance
|
1098
|
+
# @return [ErrorT]
|
1099
|
+
# @scope class
|
1100
|
+
#
|
1101
|
+
attach_function :n1p_setconsistent_handle, :lcb_n1p_setconsistent_handle, [N1QLPARAMS.by_ref, T.by_ref], ErrorT
|
1102
|
+
|
1103
|
+
# (Not documented)
|
1104
|
+
#
|
1105
|
+
# @method n1p_encode(params, rc)
|
1106
|
+
# @param [N1QLPARAMS] params
|
1107
|
+
# @param [FFI::Pointer(*ErrorT)] rc
|
1108
|
+
# @return [String]
|
1109
|
+
# @scope class
|
1110
|
+
#
|
1111
|
+
attach_function :n1p_encode, :lcb_n1p_encode, [N1QLPARAMS.by_ref, :pointer], :string
|
1112
|
+
|
1113
|
+
# (Not documented)
|
1114
|
+
#
|
1115
|
+
# @method n1p_mkcmd(params, cmd)
|
1116
|
+
# @param [N1QLPARAMS] params
|
1117
|
+
# @param [CMDN1QL] cmd
|
1118
|
+
# @return [ErrorT]
|
1119
|
+
# @scope class
|
1120
|
+
#
|
1121
|
+
attach_function :n1p_mkcmd, :lcb_n1p_mkcmd, [N1QLPARAMS.by_ref, CMDN1QL.by_ref], ErrorT
|
1122
|
+
|
1123
|
+
# (Not documented)
|
1124
|
+
#
|
1125
|
+
# @method n1ql_query(instance, cookie, cmd)
|
1126
|
+
# @param [T] instance
|
1127
|
+
# @param [FFI::Pointer(*Void)] cookie
|
1128
|
+
# @param [CMDN1QL] cmd
|
1129
|
+
# @return [ErrorT]
|
1130
|
+
# @scope class
|
1131
|
+
#
|
1132
|
+
attach_function :n1ql_query, :lcb_n1ql_query, [T.by_ref, :pointer, CMDN1QL.by_ref], ErrorT, :blocking => true
|
1133
|
+
|
1134
|
+
# (Not documented)
|
1135
|
+
#
|
1136
|
+
# @method n1ql_cancel(instance, handle)
|
1137
|
+
# @param [T] instance
|
1138
|
+
# @param [N1QLHANDLE] handle
|
1139
|
+
# @return [nil]
|
1140
|
+
# @scope class
|
1141
|
+
#
|
1142
|
+
attach_function :n1ql_cancel, :lcb_n1ql_cancel, [T.by_ref, N1QLHANDLE.by_ref], :void, :blocking => true
|
1143
|
+
|
1144
|
+
# @volatile
|
1145
|
+
# Issue a full-text query. The callback (lcb_CMDFTS::callback) will be invoked
|
1146
|
+
# for each hit. It will then be invoked one last time with the result
|
1147
|
+
# metadata (including any facets) and the lcb_RESPFTS::rflags field having
|
1148
|
+
# the @ref LCB_RESP_F_FINAL bit set
|
1149
|
+
#
|
1150
|
+
# @param instance the instance
|
1151
|
+
# @param cookie opaque user cookie to be set in the response object
|
1152
|
+
# @param cmd command containing the query and callback
|
1153
|
+
#
|
1154
|
+
# @method fts_query(instance, cookie, cmd)
|
1155
|
+
# @param [T] instance
|
1156
|
+
# @param [FFI::Pointer(*Void)] cookie
|
1157
|
+
# @param [CMDFTS] cmd
|
1158
|
+
# @return [ErrorT]
|
1159
|
+
# @scope class
|
1160
|
+
#
|
1161
|
+
attach_function :fts_query, :lcb_fts_query, [T.by_ref, :pointer, CMDFTS.by_ref], ErrorT, :blocking => true
|
1162
|
+
|
1163
|
+
# @volatile
|
1164
|
+
# Cancel a full-text query in progress. The handle is usually obtained via the
|
1165
|
+
# lcb_CMDFTS::handle pointer.
|
1166
|
+
#
|
1167
|
+
# @method fts_cancel(t, ftshandle)
|
1168
|
+
# @param [T] t
|
1169
|
+
# @param [FTSHANDLE] ftshandle
|
1170
|
+
# @return [nil]
|
1171
|
+
# @scope class
|
1172
|
+
#
|
1173
|
+
attach_function :fts_cancel, :lcb_fts_cancel, [T.by_ref, FTSHANDLE.by_ref], :void, :blocking => true
|
1174
|
+
|
1175
|
+
end
|