libcouchbase 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.gitmodules +3 -0
- data/.rspec +1 -0
- data/.travis.yml +35 -0
- data/Gemfile +4 -0
- data/LICENSE +24 -0
- data/README.md +389 -0
- data/Rakefile +75 -0
- data/ext/README.md +6 -0
- data/ext/Rakefile +20 -0
- data/ext/libcouchbase/.gitignore +130 -0
- data/ext/libcouchbase/.travis.yml +19 -0
- data/ext/libcouchbase/CMakeLists.txt +429 -0
- data/ext/libcouchbase/CONTRIBUTING.md +124 -0
- data/ext/libcouchbase/LICENSE +202 -0
- data/ext/libcouchbase/README.markdown +163 -0
- data/ext/libcouchbase/RELEASE_NOTES.markdown +2691 -0
- data/ext/libcouchbase/cmake/Modules/ConfigureDtrace.cmake +27 -0
- data/ext/libcouchbase/cmake/Modules/CopyPDB.cmake +42 -0
- data/ext/libcouchbase/cmake/Modules/DistScript.cmake +17 -0
- data/ext/libcouchbase/cmake/Modules/DownloadLcbDep.cmake +20 -0
- data/ext/libcouchbase/cmake/Modules/FindCouchbaseHdrHistogram.cmake +15 -0
- data/ext/libcouchbase/cmake/Modules/FindCouchbaseLibev.cmake +73 -0
- data/ext/libcouchbase/cmake/Modules/FindCouchbaseLibevent.cmake +52 -0
- data/ext/libcouchbase/cmake/Modules/FindCouchbaseLibuv.cmake +56 -0
- data/ext/libcouchbase/cmake/Modules/FindCouchbaseSnappy.cmake +11 -0
- data/ext/libcouchbase/cmake/Modules/GenerateConfigDotH.cmake +29 -0
- data/ext/libcouchbase/cmake/Modules/GetLibcouchbaseFlags.cmake +133 -0
- data/ext/libcouchbase/cmake/Modules/GetPlatformCCInfo.cmake +45 -0
- data/ext/libcouchbase/cmake/Modules/GetVersionInfo.cmake +70 -0
- data/ext/libcouchbase/cmake/config-cmake.h.in +60 -0
- data/ext/libcouchbase/cmake/configure +357 -0
- data/ext/libcouchbase/cmake/defs.mk.in +8 -0
- data/ext/libcouchbase/cmake/dtrace-instr-link.pl +38 -0
- data/ext/libcouchbase/cmake/source_files.cmake +73 -0
- data/ext/libcouchbase/configure.pl +1 -0
- data/ext/libcouchbase/contrib/cJSON/cJSON.c +624 -0
- data/ext/libcouchbase/contrib/cJSON/cJSON.h +158 -0
- data/ext/libcouchbase/contrib/cbsasl/CMakeLists.txt +9 -0
- data/ext/libcouchbase/contrib/cbsasl/COPYING +202 -0
- data/ext/libcouchbase/contrib/cbsasl/include/cbsasl/cbsasl.h +217 -0
- data/ext/libcouchbase/contrib/cbsasl/src/client.c +205 -0
- data/ext/libcouchbase/contrib/cbsasl/src/common.c +46 -0
- data/ext/libcouchbase/contrib/cbsasl/src/cram-md5/hmac.c +67 -0
- data/ext/libcouchbase/contrib/cbsasl/src/cram-md5/hmac.h +33 -0
- data/ext/libcouchbase/contrib/cbsasl/src/cram-md5/md5.c +296 -0
- data/ext/libcouchbase/contrib/cbsasl/src/cram-md5/md5.h +45 -0
- data/ext/libcouchbase/contrib/cbsasl/src/hash.c +573 -0
- data/ext/libcouchbase/contrib/cbsasl/src/hash.h +15 -0
- data/ext/libcouchbase/contrib/cbsasl/src/util.h +31 -0
- data/ext/libcouchbase/contrib/cliopts/CMakeLists.txt +2 -0
- data/ext/libcouchbase/contrib/cliopts/cliopts.c +747 -0
- data/ext/libcouchbase/contrib/cliopts/cliopts.h +493 -0
- data/ext/libcouchbase/contrib/genhash/genhash.c +372 -0
- data/ext/libcouchbase/contrib/genhash/genhash.h +235 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/CHANGES +157 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/CMakeLists.txt +252 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/CONTRIBUTORS +37 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/LICENSE +28 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/MINIFY.sh +15 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/README +435 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/cmake/internal_utils.cmake +227 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-death-test.h +294 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-message.h +250 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-param-test.h +1421 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-param-test.h.pump +487 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-printers.h +855 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-spi.h +232 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-test-part.h +179 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest-typed-test.h +259 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest.h +2291 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest_pred_impl.h +358 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/gtest_prod.h +58 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h +319 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h +206 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-internal.h +1158 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h +233 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h +5143 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h.pump +301 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h +619 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-port.h +1947 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-string.h +167 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-tuple.h +1012 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-tuple.h.pump +339 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h +3331 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h.pump +297 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-all.cc +48 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-death-test.cc +1344 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-filepath.cc +382 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-internal-inl.h +1218 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-port.cc +805 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-printers.cc +363 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-test-part.cc +110 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest-typed-test.cc +110 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest.cc +5015 -0
- data/ext/libcouchbase/contrib/gtest-1.7.0/src/gtest_main.cc +38 -0
- data/ext/libcouchbase/contrib/http_parser/LICENSE-MIT +23 -0
- data/ext/libcouchbase/contrib/http_parser/README.md +178 -0
- data/ext/libcouchbase/contrib/http_parser/http_parser.c +2060 -0
- data/ext/libcouchbase/contrib/http_parser/http_parser.h +321 -0
- data/ext/libcouchbase/contrib/jsonsl/LICENSE +20 -0
- data/ext/libcouchbase/contrib/jsonsl/jsonsl.c +1452 -0
- data/ext/libcouchbase/contrib/jsonsl/jsonsl.h +971 -0
- data/ext/libcouchbase/contrib/lcb-jsoncpp/CMakeLists.txt +6 -0
- data/ext/libcouchbase/contrib/lcb-jsoncpp/LICENSE +55 -0
- data/ext/libcouchbase/contrib/lcb-jsoncpp/lcb-jsoncpp-forwards.h +255 -0
- data/ext/libcouchbase/contrib/lcb-jsoncpp/lcb-jsoncpp.cpp +4892 -0
- data/ext/libcouchbase/contrib/lcb-jsoncpp/lcb-jsoncpp.h +1961 -0
- data/ext/libcouchbase/contrib/snappy/CMakeLists.txt +8 -0
- data/ext/libcouchbase/contrib/snappy/COPYING +28 -0
- data/ext/libcouchbase/contrib/snappy/snappy-c.cc +90 -0
- data/ext/libcouchbase/contrib/snappy/snappy-c.h +138 -0
- data/ext/libcouchbase/contrib/snappy/snappy-internal.h +150 -0
- data/ext/libcouchbase/contrib/snappy/snappy-lcb-msvc.h +5 -0
- data/ext/libcouchbase/contrib/snappy/snappy-sinksource.cc +71 -0
- data/ext/libcouchbase/contrib/snappy/snappy-sinksource.h +137 -0
- data/ext/libcouchbase/contrib/snappy/snappy-stubs-internal.cc +42 -0
- data/ext/libcouchbase/contrib/snappy/snappy-stubs-internal.h +491 -0
- data/ext/libcouchbase/contrib/snappy/snappy-stubs-public.h +98 -0
- data/ext/libcouchbase/contrib/snappy/snappy.cc +1307 -0
- data/ext/libcouchbase/contrib/snappy/snappy.h +184 -0
- data/ext/libcouchbase/contrib/win32-defs/iocpdefs.h +133 -0
- data/ext/libcouchbase/contrib/win32-defs/mingwdefs.h +4396 -0
- data/ext/libcouchbase/contrib/win32-defs/win_stdint.h +258 -0
- data/ext/libcouchbase/example/CMakeLists.txt +37 -0
- data/ext/libcouchbase/example/README.markdown +47 -0
- data/ext/libcouchbase/example/db/db.c +167 -0
- data/ext/libcouchbase/example/db/vb.c +227 -0
- data/ext/libcouchbase/example/instancepool/main.cc +102 -0
- data/ext/libcouchbase/example/instancepool/pool.cc +102 -0
- data/ext/libcouchbase/example/instancepool/pool.h +69 -0
- data/ext/libcouchbase/example/libeventdirect/main.c +148 -0
- data/ext/libcouchbase/example/mcc/mcc.cc +246 -0
- data/ext/libcouchbase/example/minimal/minimal.c +130 -0
- data/ext/libcouchbase/example/observe/observe.c +146 -0
- data/ext/libcouchbase/example/subdoc/subdoc-multi.cc +132 -0
- data/ext/libcouchbase/example/subdoc/subdoc-simple.cc +191 -0
- data/ext/libcouchbase/example/tick/tick.c +119 -0
- data/ext/libcouchbase/example/views/views-example.cc +83 -0
- data/ext/libcouchbase/include/libcouchbase/_cxxwrap.h +150 -0
- data/ext/libcouchbase/include/libcouchbase/api-legacy.h +1689 -0
- data/ext/libcouchbase/include/libcouchbase/api3.h +2 -0
- data/ext/libcouchbase/include/libcouchbase/assert.h +44 -0
- data/ext/libcouchbase/include/libcouchbase/cbft.h +109 -0
- data/ext/libcouchbase/include/libcouchbase/cntl-private.h +356 -0
- data/ext/libcouchbase/include/libcouchbase/cntl.h +937 -0
- data/ext/libcouchbase/include/libcouchbase/configuration.h.in +23 -0
- data/ext/libcouchbase/include/libcouchbase/couchbase.h +3677 -0
- data/ext/libcouchbase/include/libcouchbase/deprecated.h +300 -0
- data/ext/libcouchbase/include/libcouchbase/error.h +595 -0
- data/ext/libcouchbase/include/libcouchbase/http.h +1 -0
- data/ext/libcouchbase/include/libcouchbase/iops.h +1050 -0
- data/ext/libcouchbase/include/libcouchbase/ixmgmt.h +263 -0
- data/ext/libcouchbase/include/libcouchbase/kvbuf.h +132 -0
- data/ext/libcouchbase/include/libcouchbase/n1ql.h +364 -0
- data/ext/libcouchbase/include/libcouchbase/pktfwd.h +270 -0
- data/ext/libcouchbase/include/libcouchbase/plugins/io/bsdio-inl.c +367 -0
- data/ext/libcouchbase/include/libcouchbase/plugins/io/wsaerr-inl.c +76 -0
- data/ext/libcouchbase/include/libcouchbase/plugins/io/wsaerr.h +199 -0
- data/ext/libcouchbase/include/libcouchbase/subdoc.h +312 -0
- data/ext/libcouchbase/include/libcouchbase/sysdefs.h +98 -0
- data/ext/libcouchbase/include/libcouchbase/vbucket.h +643 -0
- data/ext/libcouchbase/include/libcouchbase/views.h +298 -0
- data/ext/libcouchbase/include/libcouchbase/visibility.h +65 -0
- data/ext/libcouchbase/include/memcached/COPYING +30 -0
- data/ext/libcouchbase/include/memcached/README +10 -0
- data/ext/libcouchbase/include/memcached/protocol_binary.h +1916 -0
- data/ext/libcouchbase/include/memcached/vbucket.h +42 -0
- data/ext/libcouchbase/packaging/README +7 -0
- data/ext/libcouchbase/packaging/abicheck/.gitignore +4 -0
- data/ext/libcouchbase/packaging/abicheck/Makefile +17 -0
- data/ext/libcouchbase/packaging/abicheck/README.md +27 -0
- data/ext/libcouchbase/packaging/abicheck/template.xml +3 -0
- data/ext/libcouchbase/packaging/deb/compat +1 -0
- data/ext/libcouchbase/packaging/deb/control +73 -0
- data/ext/libcouchbase/packaging/deb/copyright +10 -0
- data/ext/libcouchbase/packaging/deb/libcouchbase-dev.docs +3 -0
- data/ext/libcouchbase/packaging/deb/package.mk +31 -0
- data/ext/libcouchbase/packaging/deb/rules +46 -0
- data/ext/libcouchbase/packaging/deb/source/format +1 -0
- data/ext/libcouchbase/packaging/distinfo/README +1 -0
- data/ext/libcouchbase/packaging/distinfo/distinfo.cmake.in +4 -0
- data/ext/libcouchbase/packaging/dllversion.rc.in +39 -0
- data/ext/libcouchbase/packaging/libcouchbase.pc.in +10 -0
- data/ext/libcouchbase/packaging/nuget/libcouchbase.autopkg +76 -0
- data/ext/libcouchbase/packaging/parse-git-describe.pl +166 -0
- data/ext/libcouchbase/packaging/rpm/libcouchbase.spec.in +108 -0
- data/ext/libcouchbase/packaging/rpm/package.mk +40 -0
- data/ext/libcouchbase/plugins/io/iocp/CMakeLists.txt +9 -0
- data/ext/libcouchbase/plugins/io/iocp/iocp_iops.c +466 -0
- data/ext/libcouchbase/plugins/io/iocp/iocp_iops.h +217 -0
- data/ext/libcouchbase/plugins/io/iocp/iocp_loop.c +295 -0
- data/ext/libcouchbase/plugins/io/iocp/iocp_timer.c +79 -0
- data/ext/libcouchbase/plugins/io/iocp/iocp_util.c +229 -0
- data/ext/libcouchbase/plugins/io/libev/CMakeLists.txt +29 -0
- data/ext/libcouchbase/plugins/io/libev/libev_io_opts.h +65 -0
- data/ext/libcouchbase/plugins/io/libev/plugin-libev.c +289 -0
- data/ext/libcouchbase/plugins/io/libevent/CMakeLists.txt +29 -0
- data/ext/libcouchbase/plugins/io/libevent/libevent_io_opts.h +67 -0
- data/ext/libcouchbase/plugins/io/libevent/plugin-libevent.c +292 -0
- data/ext/libcouchbase/plugins/io/libuv/CMakeLists.txt +42 -0
- data/ext/libcouchbase/plugins/io/libuv/libuv_compat.h +212 -0
- data/ext/libcouchbase/plugins/io/libuv/libuv_io_opts.h +118 -0
- data/ext/libcouchbase/plugins/io/libuv/plugin-internal.h +148 -0
- data/ext/libcouchbase/plugins/io/libuv/plugin-libuv.c +648 -0
- data/ext/libcouchbase/plugins/io/select/CMakeLists.txt +11 -0
- data/ext/libcouchbase/plugins/io/select/plugin-select.c +448 -0
- data/ext/libcouchbase/plugins/io/select/select_io_opts.h +39 -0
- data/ext/libcouchbase/src/README.md +103 -0
- data/ext/libcouchbase/src/aspend.h +106 -0
- data/ext/libcouchbase/src/auth.cc +74 -0
- data/ext/libcouchbase/src/auth.h +54 -0
- data/ext/libcouchbase/src/bootstrap.c +269 -0
- data/ext/libcouchbase/src/bootstrap.h +129 -0
- data/ext/libcouchbase/src/bucketconfig/bc_cccp.c +495 -0
- data/ext/libcouchbase/src/bucketconfig/bc_file.c +347 -0
- data/ext/libcouchbase/src/bucketconfig/bc_http.c +630 -0
- data/ext/libcouchbase/src/bucketconfig/bc_http.h +82 -0
- data/ext/libcouchbase/src/bucketconfig/bc_mcraw.c +150 -0
- data/ext/libcouchbase/src/bucketconfig/clconfig.h +681 -0
- data/ext/libcouchbase/src/bucketconfig/confmon.c +474 -0
- data/ext/libcouchbase/src/callbacks.c +378 -0
- data/ext/libcouchbase/src/cbft.cc +210 -0
- data/ext/libcouchbase/src/cntl.cc +847 -0
- data/ext/libcouchbase/src/config_static.h +159 -0
- data/ext/libcouchbase/src/connspec.cc +462 -0
- data/ext/libcouchbase/src/connspec.h +105 -0
- data/ext/libcouchbase/src/ctx-log-inl.h +27 -0
- data/ext/libcouchbase/src/dump.c +98 -0
- data/ext/libcouchbase/src/getconfig.c +100 -0
- data/ext/libcouchbase/src/gethrtime.c +109 -0
- data/ext/libcouchbase/src/handler.c +922 -0
- data/ext/libcouchbase/src/hashset.c +164 -0
- data/ext/libcouchbase/src/hashset.h +86 -0
- data/ext/libcouchbase/src/hashtable.c +75 -0
- data/ext/libcouchbase/src/hdr_timings.c +92 -0
- data/ext/libcouchbase/src/hostlist.cc +301 -0
- data/ext/libcouchbase/src/hostlist.h +171 -0
- data/ext/libcouchbase/src/http/http-priv.h +307 -0
- data/ext/libcouchbase/src/http/http.cc +633 -0
- data/ext/libcouchbase/src/http/http.h +34 -0
- data/ext/libcouchbase/src/http/http_io.cc +307 -0
- data/ext/libcouchbase/src/instance.cc +722 -0
- data/ext/libcouchbase/src/internal.h +244 -0
- data/ext/libcouchbase/src/iofactory.c +575 -0
- data/ext/libcouchbase/src/jsparse/parser.cc +519 -0
- data/ext/libcouchbase/src/jsparse/parser.h +173 -0
- data/ext/libcouchbase/src/lcbht/lcbht.c +282 -0
- data/ext/libcouchbase/src/lcbht/lcbht.h +199 -0
- data/ext/libcouchbase/src/lcbio/connect.c +557 -0
- data/ext/libcouchbase/src/lcbio/connect.h +364 -0
- data/ext/libcouchbase/src/lcbio/ctx.c +611 -0
- data/ext/libcouchbase/src/lcbio/ctx.h +405 -0
- data/ext/libcouchbase/src/lcbio/iotable.c +290 -0
- data/ext/libcouchbase/src/lcbio/iotable.h +84 -0
- data/ext/libcouchbase/src/lcbio/ioutils.c +350 -0
- data/ext/libcouchbase/src/lcbio/ioutils.h +203 -0
- data/ext/libcouchbase/src/lcbio/lcbio.h +51 -0
- data/ext/libcouchbase/src/lcbio/manager.c +584 -0
- data/ext/libcouchbase/src/lcbio/manager.h +156 -0
- data/ext/libcouchbase/src/lcbio/protoctx.c +84 -0
- data/ext/libcouchbase/src/lcbio/rw-inl.h +115 -0
- data/ext/libcouchbase/src/lcbio/ssl.h +149 -0
- data/ext/libcouchbase/src/lcbio/timer-ng.h +179 -0
- data/ext/libcouchbase/src/lcbio/timer.c +132 -0
- data/ext/libcouchbase/src/legacy.c +430 -0
- data/ext/libcouchbase/src/list.c +144 -0
- data/ext/libcouchbase/src/list.h +127 -0
- data/ext/libcouchbase/src/logging.c +244 -0
- data/ext/libcouchbase/src/logging.h +86 -0
- data/ext/libcouchbase/src/mc/compress.c +90 -0
- data/ext/libcouchbase/src/mc/compress.h +61 -0
- data/ext/libcouchbase/src/mc/forward.c +186 -0
- data/ext/libcouchbase/src/mc/forward.h +90 -0
- data/ext/libcouchbase/src/mc/iovcursor-inl.h +279 -0
- data/ext/libcouchbase/src/mc/iovcursor.h +66 -0
- data/ext/libcouchbase/src/mc/mcreq-flush-inl.h +111 -0
- data/ext/libcouchbase/src/mc/mcreq.c +954 -0
- data/ext/libcouchbase/src/mc/mcreq.h +977 -0
- data/ext/libcouchbase/src/mcserver/mcserver.c +784 -0
- data/ext/libcouchbase/src/mcserver/mcserver.h +121 -0
- data/ext/libcouchbase/src/mcserver/negotiate.c +656 -0
- data/ext/libcouchbase/src/mcserver/negotiate.h +119 -0
- data/ext/libcouchbase/src/n1ql/ixmgmt.cc +860 -0
- data/ext/libcouchbase/src/n1ql/n1ql-internal.h +22 -0
- data/ext/libcouchbase/src/n1ql/n1ql.cc +729 -0
- data/ext/libcouchbase/src/n1ql/params.cc +215 -0
- data/ext/libcouchbase/src/netbuf/netbuf-defs.h +89 -0
- data/ext/libcouchbase/src/netbuf/netbuf-mblock.h +235 -0
- data/ext/libcouchbase/src/netbuf/netbuf.c +929 -0
- data/ext/libcouchbase/src/netbuf/netbuf.h +452 -0
- data/ext/libcouchbase/src/newconfig.c +385 -0
- data/ext/libcouchbase/src/nodeinfo.cc +194 -0
- data/ext/libcouchbase/src/operations/cbflush.c +71 -0
- data/ext/libcouchbase/src/operations/counter.c +116 -0
- data/ext/libcouchbase/src/operations/durability-cas.c +224 -0
- data/ext/libcouchbase/src/operations/durability-seqno.c +157 -0
- data/ext/libcouchbase/src/operations/durability.c +668 -0
- data/ext/libcouchbase/src/operations/durability_internal.h +199 -0
- data/ext/libcouchbase/src/operations/get.c +409 -0
- data/ext/libcouchbase/src/operations/observe-seqno.c +96 -0
- data/ext/libcouchbase/src/operations/observe.c +340 -0
- data/ext/libcouchbase/src/operations/pktfwd.c +86 -0
- data/ext/libcouchbase/src/operations/remove.c +83 -0
- data/ext/libcouchbase/src/operations/stats.c +461 -0
- data/ext/libcouchbase/src/operations/store.c +360 -0
- data/ext/libcouchbase/src/operations/subdoc.cc +510 -0
- data/ext/libcouchbase/src/operations/touch.c +81 -0
- data/ext/libcouchbase/src/packetutils.c +60 -0
- data/ext/libcouchbase/src/packetutils.h +147 -0
- data/ext/libcouchbase/src/probes.d +211 -0
- data/ext/libcouchbase/src/rdb/bigalloc.c +225 -0
- data/ext/libcouchbase/src/rdb/bigalloc.h +73 -0
- data/ext/libcouchbase/src/rdb/chunkalloc.c +174 -0
- data/ext/libcouchbase/src/rdb/libcalloc.c +94 -0
- data/ext/libcouchbase/src/rdb/rope.c +419 -0
- data/ext/libcouchbase/src/rdb/rope.h +488 -0
- data/ext/libcouchbase/src/retrychk.c +113 -0
- data/ext/libcouchbase/src/retryq.c +424 -0
- data/ext/libcouchbase/src/retryq.h +157 -0
- data/ext/libcouchbase/src/ringbuffer.c +442 -0
- data/ext/libcouchbase/src/ringbuffer.h +100 -0
- data/ext/libcouchbase/src/settings.c +95 -0
- data/ext/libcouchbase/src/settings.h +188 -0
- data/ext/libcouchbase/src/simplestring.c +211 -0
- data/ext/libcouchbase/src/simplestring.h +228 -0
- data/ext/libcouchbase/src/sllist-inl.h +197 -0
- data/ext/libcouchbase/src/sllist.h +76 -0
- data/ext/libcouchbase/src/ssl/CMakeLists.txt +23 -0
- data/ext/libcouchbase/src/ssl/ssl_c.c +415 -0
- data/ext/libcouchbase/src/ssl/ssl_common.c +454 -0
- data/ext/libcouchbase/src/ssl/ssl_e.c +408 -0
- data/ext/libcouchbase/src/ssl/ssl_iot_common.h +180 -0
- data/ext/libcouchbase/src/ssobuf.h +82 -0
- data/ext/libcouchbase/src/strcodecs/base64.c +123 -0
- data/ext/libcouchbase/src/strcodecs/strcodecs.h +285 -0
- data/ext/libcouchbase/src/timings.c +208 -0
- data/ext/libcouchbase/src/trace.h +105 -0
- data/ext/libcouchbase/src/utilities.c +171 -0
- data/ext/libcouchbase/src/vbucket/CMakeLists.txt +2 -0
- data/ext/libcouchbase/src/vbucket/aliases.h +35 -0
- data/ext/libcouchbase/src/vbucket/crc32.h +83 -0
- data/ext/libcouchbase/src/vbucket/hash.h +30 -0
- data/ext/libcouchbase/src/vbucket/json-inl.h +112 -0
- data/ext/libcouchbase/src/vbucket/ketama.c +66 -0
- data/ext/libcouchbase/src/vbucket/rfc1321/global.h +32 -0
- data/ext/libcouchbase/src/vbucket/rfc1321/md5.h +35 -0
- data/ext/libcouchbase/src/vbucket/rfc1321/md5c-inl.h +335 -0
- data/ext/libcouchbase/src/vbucket/vbucket.c +1543 -0
- data/ext/libcouchbase/src/views/docreq.c +194 -0
- data/ext/libcouchbase/src/views/docreq.h +83 -0
- data/ext/libcouchbase/src/views/viewreq.c +358 -0
- data/ext/libcouchbase/src/views/viewreq.h +36 -0
- data/ext/libcouchbase/src/wait.c +161 -0
- data/ext/libcouchbase/tests/CMakeLists.txt +140 -0
- data/ext/libcouchbase/tests/basic/t_base64.cc +81 -0
- data/ext/libcouchbase/tests/basic/t_ccbc103.cc +95 -0
- data/ext/libcouchbase/tests/basic/t_connstr.cc +404 -0
- data/ext/libcouchbase/tests/basic/t_creds.cc +32 -0
- data/ext/libcouchbase/tests/basic/t_ctlcodes.cc +92 -0
- data/ext/libcouchbase/tests/basic/t_hashset.cc +262 -0
- data/ext/libcouchbase/tests/basic/t_host.cc +198 -0
- data/ext/libcouchbase/tests/basic/t_jsparse.cc +137 -0
- data/ext/libcouchbase/tests/basic/t_jsparse.h +589 -0
- data/ext/libcouchbase/tests/basic/t_list.cc +155 -0
- data/ext/libcouchbase/tests/basic/t_logger.cc +65 -0
- data/ext/libcouchbase/tests/basic/t_misc.cc +24 -0
- data/ext/libcouchbase/tests/basic/t_n1qlstrings.cc +18 -0
- data/ext/libcouchbase/tests/basic/t_netbuf.cc +446 -0
- data/ext/libcouchbase/tests/basic/t_packet.cc +222 -0
- data/ext/libcouchbase/tests/basic/t_ringbuffer.cc +278 -0
- data/ext/libcouchbase/tests/basic/t_slist.cc +429 -0
- data/ext/libcouchbase/tests/basic/t_strerror.cc +64 -0
- data/ext/libcouchbase/tests/basic/t_string.cc +112 -0
- data/ext/libcouchbase/tests/basic/t_urlencode.cc +132 -0
- data/ext/libcouchbase/tests/check-all.cc +608 -0
- data/ext/libcouchbase/tests/htparse/t_basic.cc +193 -0
- data/ext/libcouchbase/tests/ioserver/connection.cc +166 -0
- data/ext/libcouchbase/tests/ioserver/future.cc +50 -0
- data/ext/libcouchbase/tests/ioserver/ioserver.cc +104 -0
- data/ext/libcouchbase/tests/ioserver/ioserver.h +478 -0
- data/ext/libcouchbase/tests/ioserver/socket.cc +88 -0
- data/ext/libcouchbase/tests/ioserver/ssl_connection.cc +145 -0
- data/ext/libcouchbase/tests/ioserver/threads-pthreads.cc +119 -0
- data/ext/libcouchbase/tests/ioserver/threads-win32.cc +117 -0
- data/ext/libcouchbase/tests/ioserver/threads.h +66 -0
- data/ext/libcouchbase/tests/iotests/iotests.h +15 -0
- data/ext/libcouchbase/tests/iotests/mock-environment.cc +524 -0
- data/ext/libcouchbase/tests/iotests/mock-environment.h +385 -0
- data/ext/libcouchbase/tests/iotests/mock-unit-test.cc +67 -0
- data/ext/libcouchbase/tests/iotests/mock-unit-test.h +61 -0
- data/ext/libcouchbase/tests/iotests/serverparams.h +76 -0
- data/ext/libcouchbase/tests/iotests/t_arithmetic.cc +143 -0
- data/ext/libcouchbase/tests/iotests/t_behavior.cc +226 -0
- data/ext/libcouchbase/tests/iotests/t_configcache.cc +117 -0
- data/ext/libcouchbase/tests/iotests/t_confmon.cc +241 -0
- data/ext/libcouchbase/tests/iotests/t_durability.cc +1059 -0
- data/ext/libcouchbase/tests/iotests/t_forward.cc +110 -0
- data/ext/libcouchbase/tests/iotests/t_get.cc +512 -0
- data/ext/libcouchbase/tests/iotests/t_http.cc +438 -0
- data/ext/libcouchbase/tests/iotests/t_iops.cc +175 -0
- data/ext/libcouchbase/tests/iotests/t_lock.cc +275 -0
- data/ext/libcouchbase/tests/iotests/t_misc.cc +713 -0
- data/ext/libcouchbase/tests/iotests/t_mutate.cc +609 -0
- data/ext/libcouchbase/tests/iotests/t_n1ql.cc +270 -0
- data/ext/libcouchbase/tests/iotests/t_netfail.cc +654 -0
- data/ext/libcouchbase/tests/iotests/t_obseqno.cc +157 -0
- data/ext/libcouchbase/tests/iotests/t_regression.cc +321 -0
- data/ext/libcouchbase/tests/iotests/t_sched.cc +88 -0
- data/ext/libcouchbase/tests/iotests/t_serverops.cc +230 -0
- data/ext/libcouchbase/tests/iotests/t_smoke.cc +528 -0
- data/ext/libcouchbase/tests/iotests/t_subdoc.cc +822 -0
- data/ext/libcouchbase/tests/iotests/t_syncmode.cc +64 -0
- data/ext/libcouchbase/tests/iotests/t_views.cc +405 -0
- data/ext/libcouchbase/tests/iotests/testutil.cc +250 -0
- data/ext/libcouchbase/tests/iotests/testutil.h +163 -0
- data/ext/libcouchbase/tests/mc/mctest.h +119 -0
- data/ext/libcouchbase/tests/mc/pktmaker.h +101 -0
- data/ext/libcouchbase/tests/mc/t_alloc.cc +269 -0
- data/ext/libcouchbase/tests/mc/t_context.cc +100 -0
- data/ext/libcouchbase/tests/mc/t_flush.cc +185 -0
- data/ext/libcouchbase/tests/mc/t_forward.cc +239 -0
- data/ext/libcouchbase/tests/mc/t_ioflush.cc +102 -0
- data/ext/libcouchbase/tests/mc/t_iovcursor.cc +173 -0
- data/ext/libcouchbase/tests/mocksupport/procutil.c +305 -0
- data/ext/libcouchbase/tests/mocksupport/procutil.h +89 -0
- data/ext/libcouchbase/tests/mocksupport/server.c +391 -0
- data/ext/libcouchbase/tests/mocksupport/server.h +72 -0
- data/ext/libcouchbase/tests/mocksupport/timeout.c +69 -0
- data/ext/libcouchbase/tests/nonio_tests.cc +23 -0
- data/ext/libcouchbase/tests/rdb/rdbtest.h +133 -0
- data/ext/libcouchbase/tests/rdb/t_basic.cc +128 -0
- data/ext/libcouchbase/tests/rdb/t_bigalloc.cc +93 -0
- data/ext/libcouchbase/tests/rdb/t_refs.cc +112 -0
- data/ext/libcouchbase/tests/socktests/socktest.cc +347 -0
- data/ext/libcouchbase/tests/socktests/socktest.h +448 -0
- data/ext/libcouchbase/tests/socktests/t_basic.cc +143 -0
- data/ext/libcouchbase/tests/socktests/t_ctx.cc +73 -0
- data/ext/libcouchbase/tests/socktests/t_manager.cc +179 -0
- data/ext/libcouchbase/tests/socktests/t_putex.cc +256 -0
- data/ext/libcouchbase/tests/socktests/t_read.cc +187 -0
- data/ext/libcouchbase/tests/socktests/t_reentrant.cc +143 -0
- data/ext/libcouchbase/tests/socktests/t_ssl.cc +80 -0
- data/ext/libcouchbase/tests/socktests/t_write.cc +95 -0
- data/ext/libcouchbase/tests/start_mock.bat +15 -0
- data/ext/libcouchbase/tests/start_mock.sh +42 -0
- data/ext/libcouchbase/tests/unit_tests.cc +43 -0
- data/ext/libcouchbase/tests/vbucket/confdata/bad.json +101 -0
- data/ext/libcouchbase/tests/vbucket/confdata/full_25.json +363 -0
- data/ext/libcouchbase/tests/vbucket/confdata/memd_25.json +90 -0
- data/ext/libcouchbase/tests/vbucket/confdata/memd_30.json +1 -0
- data/ext/libcouchbase/tests/vbucket/confdata/memd_45.json +1 -0
- data/ext/libcouchbase/tests/vbucket/confdata/terse_25.json +291 -0
- data/ext/libcouchbase/tests/vbucket/confdata/terse_30.json +1 -0
- data/ext/libcouchbase/tests/vbucket/t_config.cc +341 -0
- data/ext/libcouchbase/tools/CMakeLists.txt +51 -0
- data/ext/libcouchbase/tools/cbc-handlers.h +462 -0
- data/ext/libcouchbase/tools/cbc-n1qlback.cc +439 -0
- data/ext/libcouchbase/tools/cbc-pillowfight.cc +822 -0
- data/ext/libcouchbase/tools/cbc.cc +1541 -0
- data/ext/libcouchbase/tools/common/histogram.cc +43 -0
- data/ext/libcouchbase/tools/common/histogram.h +23 -0
- data/ext/libcouchbase/tools/common/my_inttypes.h +22 -0
- data/ext/libcouchbase/tools/common/options.cc +420 -0
- data/ext/libcouchbase/tools/common/options.h +81 -0
- data/ext/libcouchbase/tools/docgen/docgen.h +469 -0
- data/ext/libcouchbase/tools/docgen/loc.h +210 -0
- data/ext/libcouchbase/tools/docgen/placeholders.h +211 -0
- data/ext/libcouchbase/tools/docgen/seqgen.h +94 -0
- data/lib/libcouchbase.rb +36 -0
- data/lib/libcouchbase/bucket.rb +819 -0
- data/lib/libcouchbase/callbacks.rb +72 -0
- data/lib/libcouchbase/connection.rb +790 -0
- data/lib/libcouchbase/design_docs.rb +86 -0
- data/lib/libcouchbase/error.rb +68 -0
- data/lib/libcouchbase/ext/libcouchbase.rb +1135 -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 +49 -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 +991 -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 +26 -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_iocp.rb +26 -0
- data/lib/libcouchbase/ext/libcouchbase_libuv.rb +18 -0
- data/lib/libcouchbase/ext/tasks.rb +87 -0
- data/lib/libcouchbase/n1ql.rb +73 -0
- data/lib/libcouchbase/query_full_text.rb +147 -0
- data/lib/libcouchbase/query_n1ql.rb +121 -0
- data/lib/libcouchbase/query_view.rb +129 -0
- data/lib/libcouchbase/results_fiber.rb +262 -0
- data/lib/libcouchbase/results_native.rb +211 -0
- data/lib/libcouchbase/version.rb +5 -0
- data/libcouchbase.gemspec +61 -0
- data/spec/bucket_spec.rb +270 -0
- data/spec/connection_spec.rb +277 -0
- data/spec/design_docs_spec.rb +23 -0
- data/spec/error_spec.rb +26 -0
- data/spec/fts_spec.rb +129 -0
- data/spec/n1ql_spec.rb +201 -0
- data/spec/results_libuv_spec.rb +229 -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/view_spec.rb +195 -0
- metadata +775 -0
@@ -0,0 +1,86 @@
|
|
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
|
+
def result(promise)
|
50
|
+
@result.call(promise)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
class DesignDoc
|
55
|
+
def initialize(id, row, bucket, connection, result_meth)
|
56
|
+
@connection = connection
|
57
|
+
@result = result_meth
|
58
|
+
@bucket = bucket
|
59
|
+
@row = row
|
60
|
+
@id = id
|
61
|
+
end
|
62
|
+
|
63
|
+
def views
|
64
|
+
@row[:json][:views].keys
|
65
|
+
end
|
66
|
+
|
67
|
+
def view(name, extended: false, **opts, &blk)
|
68
|
+
name = name.to_sym
|
69
|
+
entry = @row[:json][:views][name]
|
70
|
+
if entry
|
71
|
+
@bucket.view(@id, name, **opts, &blk)
|
72
|
+
else
|
73
|
+
nil
|
74
|
+
end
|
75
|
+
end
|
76
|
+
alias_method :[], :view
|
77
|
+
|
78
|
+
|
79
|
+
protected
|
80
|
+
|
81
|
+
|
82
|
+
def result(promise)
|
83
|
+
@result.call(promise)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
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,1135 @@
|
|
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/bin/libcouchbase.#{FFI::Platform::LIBSUFFIX}", __FILE__)
|
8
|
+
require 'libcouchbase/ext/libcouchbase_iocp'
|
9
|
+
else
|
10
|
+
ffi_lib ::File.expand_path("../../../../ext/libcouchbase/build/lib/libcouchbase.#{FFI::Platform::LIBSUFFIX}", __FILE__)
|
11
|
+
require 'libcouchbase/ext/libcouchbase_libuv'
|
12
|
+
end
|
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_setopt(params, name, n_name, value, n_value)
|
1022
|
+
# @param [N1QLPARAMS] params
|
1023
|
+
# @param [String] name
|
1024
|
+
# @param [Integer] n_name
|
1025
|
+
# @param [String] value
|
1026
|
+
# @param [Integer] n_value
|
1027
|
+
# @return [ErrorT]
|
1028
|
+
# @scope class
|
1029
|
+
#
|
1030
|
+
attach_function :n1p_setopt, :lcb_n1p_setopt, [N1QLPARAMS.by_ref, :string, :ulong, :string, :ulong], ErrorT
|
1031
|
+
|
1032
|
+
# (Not documented)
|
1033
|
+
#
|
1034
|
+
# @method n1p_setconsistency(params, mode)
|
1035
|
+
# @param [N1QLPARAMS] params
|
1036
|
+
# @param [Integer] mode
|
1037
|
+
# @return [ErrorT]
|
1038
|
+
# @scope class
|
1039
|
+
#
|
1040
|
+
attach_function :n1p_setconsistency, :lcb_n1p_setconsistency, [N1QLPARAMS.by_ref, :int], ErrorT
|
1041
|
+
|
1042
|
+
# (Not documented)
|
1043
|
+
#
|
1044
|
+
# @method n1p_setconsistent_token(params, keyspace, st)
|
1045
|
+
# @param [N1QLPARAMS] params
|
1046
|
+
# @param [String] keyspace
|
1047
|
+
# @param [MUTATIONTOKEN] st
|
1048
|
+
# @return [ErrorT]
|
1049
|
+
# @scope class
|
1050
|
+
#
|
1051
|
+
attach_function :n1p_setconsistent_token, :lcb_n1p_setconsistent_token, [N1QLPARAMS.by_ref, :string, MUTATIONTOKEN.by_ref], ErrorT
|
1052
|
+
|
1053
|
+
# (Not documented)
|
1054
|
+
#
|
1055
|
+
# @method n1p_setconsistent_handle(params, instance)
|
1056
|
+
# @param [N1QLPARAMS] params
|
1057
|
+
# @param [T] instance
|
1058
|
+
# @return [ErrorT]
|
1059
|
+
# @scope class
|
1060
|
+
#
|
1061
|
+
attach_function :n1p_setconsistent_handle, :lcb_n1p_setconsistent_handle, [N1QLPARAMS.by_ref, T.by_ref], ErrorT
|
1062
|
+
|
1063
|
+
# (Not documented)
|
1064
|
+
#
|
1065
|
+
# @method n1p_encode(params, rc)
|
1066
|
+
# @param [N1QLPARAMS] params
|
1067
|
+
# @param [FFI::Pointer(*ErrorT)] rc
|
1068
|
+
# @return [String]
|
1069
|
+
# @scope class
|
1070
|
+
#
|
1071
|
+
attach_function :n1p_encode, :lcb_n1p_encode, [N1QLPARAMS.by_ref, :pointer], :string
|
1072
|
+
|
1073
|
+
# (Not documented)
|
1074
|
+
#
|
1075
|
+
# @method n1p_mkcmd(params, cmd)
|
1076
|
+
# @param [N1QLPARAMS] params
|
1077
|
+
# @param [CMDN1QL] cmd
|
1078
|
+
# @return [ErrorT]
|
1079
|
+
# @scope class
|
1080
|
+
#
|
1081
|
+
attach_function :n1p_mkcmd, :lcb_n1p_mkcmd, [N1QLPARAMS.by_ref, CMDN1QL.by_ref], ErrorT
|
1082
|
+
|
1083
|
+
# (Not documented)
|
1084
|
+
#
|
1085
|
+
# @method n1ql_query(instance, cookie, cmd)
|
1086
|
+
# @param [T] instance
|
1087
|
+
# @param [FFI::Pointer(*Void)] cookie
|
1088
|
+
# @param [CMDN1QL] cmd
|
1089
|
+
# @return [ErrorT]
|
1090
|
+
# @scope class
|
1091
|
+
#
|
1092
|
+
attach_function :n1ql_query, :lcb_n1ql_query, [T.by_ref, :pointer, CMDN1QL.by_ref], ErrorT, :blocking => true
|
1093
|
+
|
1094
|
+
# (Not documented)
|
1095
|
+
#
|
1096
|
+
# @method n1ql_cancel(instance, handle)
|
1097
|
+
# @param [T] instance
|
1098
|
+
# @param [N1QLHANDLE] handle
|
1099
|
+
# @return [nil]
|
1100
|
+
# @scope class
|
1101
|
+
#
|
1102
|
+
attach_function :n1ql_cancel, :lcb_n1ql_cancel, [T.by_ref, N1QLHANDLE.by_ref], :void, :blocking => true
|
1103
|
+
|
1104
|
+
# @volatile
|
1105
|
+
# Issue a full-text query. The callback (lcb_CMDFTS::callback) will be invoked
|
1106
|
+
# for each hit. It will then be invoked one last time with the result
|
1107
|
+
# metadata (including any facets) and the lcb_RESPFTS::rflags field having
|
1108
|
+
# the @ref LCB_RESP_F_FINAL bit set
|
1109
|
+
#
|
1110
|
+
# @param instance the instance
|
1111
|
+
# @param cookie opaque user cookie to be set in the response object
|
1112
|
+
# @param cmd command containing the query and callback
|
1113
|
+
#
|
1114
|
+
# @method fts_query(instance, cookie, cmd)
|
1115
|
+
# @param [T] instance
|
1116
|
+
# @param [FFI::Pointer(*Void)] cookie
|
1117
|
+
# @param [CMDFTS] cmd
|
1118
|
+
# @return [ErrorT]
|
1119
|
+
# @scope class
|
1120
|
+
#
|
1121
|
+
attach_function :fts_query, :lcb_fts_query, [T.by_ref, :pointer, CMDFTS.by_ref], ErrorT, :blocking => true
|
1122
|
+
|
1123
|
+
# @volatile
|
1124
|
+
# Cancel a full-text query in progress. The handle is usually obtained via the
|
1125
|
+
# lcb_CMDFTS::handle pointer.
|
1126
|
+
#
|
1127
|
+
# @method fts_cancel(t, ftshandle)
|
1128
|
+
# @param [T] t
|
1129
|
+
# @param [FTSHANDLE] ftshandle
|
1130
|
+
# @return [nil]
|
1131
|
+
# @scope class
|
1132
|
+
#
|
1133
|
+
attach_function :fts_cancel, :lcb_fts_cancel, [T.by_ref, FTSHANDLE.by_ref], :void, :blocking => true
|
1134
|
+
|
1135
|
+
end
|