mt-libcouchbase 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -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/ext/libcouchbase/.gitignore +132 -0
- data/ext/libcouchbase/CMakeLists.txt +455 -0
- data/ext/libcouchbase/CONTRIBUTING.md +105 -0
- data/ext/libcouchbase/LICENSE +202 -0
- data/ext/libcouchbase/README.markdown +195 -0
- data/ext/libcouchbase/RELEASE_NOTES.markdown +3523 -0
- data/ext/libcouchbase/cmake/Modules/ConfigureDtrace.cmake +52 -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 +18 -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 +54 -0
- data/ext/libcouchbase/cmake/Modules/FindCouchbaseLibuv.cmake +57 -0
- data/ext/libcouchbase/cmake/Modules/FindProfiler.cmake +16 -0
- data/ext/libcouchbase/cmake/Modules/GenerateConfigDotH.cmake +49 -0
- data/ext/libcouchbase/cmake/Modules/GetLibcouchbaseFlags.cmake +142 -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 +80 -0
- data/ext/libcouchbase/cmake/configure +355 -0
- data/ext/libcouchbase/cmake/defs.mk.in +6 -0
- data/ext/libcouchbase/cmake/dtrace-instr-link.pl +51 -0
- data/ext/libcouchbase/cmake/libcouchbase.stp.in +829 -0
- data/ext/libcouchbase/cmake/source_files.cmake +104 -0
- data/ext/libcouchbase/contrib/cJSON/cJSON.c +1022 -0
- data/ext/libcouchbase/contrib/cJSON/cJSON.h +158 -0
- data/ext/libcouchbase/contrib/cbsasl/CMakeLists.txt +25 -0
- data/ext/libcouchbase/contrib/cbsasl/COPYING +202 -0
- data/ext/libcouchbase/contrib/cbsasl/include/cbsasl/cbsasl.h +259 -0
- data/ext/libcouchbase/contrib/cbsasl/src/client.c +419 -0
- data/ext/libcouchbase/contrib/cbsasl/src/common.c +50 -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/scram-sha/scram_utils.c +500 -0
- data/ext/libcouchbase/contrib/cbsasl/src/scram-sha/scram_utils.h +99 -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 +938 -0
- data/ext/libcouchbase/contrib/cliopts/cliopts.h +610 -0
- data/ext/libcouchbase/contrib/genhash/genhash.c +371 -0
- data/ext/libcouchbase/contrib/genhash/genhash.h +241 -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 +4893 -0
- data/ext/libcouchbase/contrib/lcb-jsoncpp/lcb-jsoncpp.h +1961 -0
- data/ext/libcouchbase/contrib/snappy/CMakeLists.txt +7 -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 +75 -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 +100 -0
- data/ext/libcouchbase/contrib/snappy/snappy.cc +1312 -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/doc/Doxyfile +2495 -0
- data/ext/libcouchbase/doc/DoxygenLayout.xml +109 -0
- data/ext/libcouchbase/doc/Makefile +44 -0
- data/ext/libcouchbase/doc/apiattr.h +117 -0
- data/ext/libcouchbase/doc/cbc-n1qlback.markdown +88 -0
- data/ext/libcouchbase/doc/cbc-pillowfight.markdown +296 -0
- data/ext/libcouchbase/doc/cbc-subdoc.markdown +299 -0
- data/ext/libcouchbase/doc/cbc.markdown +763 -0
- data/ext/libcouchbase/doc/cbcrc.markdown +52 -0
- data/ext/libcouchbase/doc/common-additional-options.markdown +82 -0
- data/ext/libcouchbase/doc/common-options.markdown +71 -0
- data/ext/libcouchbase/doc/environment.h +93 -0
- data/ext/libcouchbase/doc/example/threads.c +77 -0
- data/ext/libcouchbase/doc/footer.html +22 -0
- data/ext/libcouchbase/doc/genman.sh +25 -0
- data/ext/libcouchbase/doc/header.html +52 -0
- data/ext/libcouchbase/doc/intro.h +130 -0
- data/ext/libcouchbase/doc/mainpage.h +136 -0
- data/ext/libcouchbase/doc/man/cbc-admin.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-bucket-create.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-bucket-delete.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-cat.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-connstr.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-cp.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-create.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-decr.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-flush.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-hash.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-incr.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-lock.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-mcflush.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-mcversion.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-n1ql.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-n1qlback.1 +198 -0
- data/ext/libcouchbase/doc/man/cbc-observe.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-pillowfight.1 +499 -0
- data/ext/libcouchbase/doc/man/cbc-ping.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-rm.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-role-list.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-stats.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-subdoc.1 +494 -0
- data/ext/libcouchbase/doc/man/cbc-unlock.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-user-delete.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-user-list.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-user-upsert.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-verbosity.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-version.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-view.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc-watch.1 +1 -0
- data/ext/libcouchbase/doc/man/cbc.1 +1035 -0
- data/ext/libcouchbase/doc/man/cbcrc.4 +71 -0
- data/ext/libcouchbase/doc/style.css +1162 -0
- data/ext/libcouchbase/example/CMakeLists.txt +52 -0
- data/ext/libcouchbase/example/README.markdown +47 -0
- data/ext/libcouchbase/example/analytics/.gitignore +1 -0
- data/ext/libcouchbase/example/analytics/analytics.c +158 -0
- data/ext/libcouchbase/example/analytics/build-queries.rb +34 -0
- data/ext/libcouchbase/example/analytics/cJSON.c +1 -0
- data/ext/libcouchbase/example/analytics/cJSON.h +1 -0
- data/ext/libcouchbase/example/analytics/queries/00-show-dataverse.json +5 -0
- data/ext/libcouchbase/example/analytics/queries/01-setup-dataset-breweries.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/02-setup-dataset-beers.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/03-initiate-shadow.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/04-list-datasets.json +7 -0
- data/ext/libcouchbase/example/analytics/queries/05-count-breweries.json +5 -0
- data/ext/libcouchbase/example/analytics/queries/06-first-brewery.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/07-key-based-lookup.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/08-exact-match-lookup.json +7 -0
- data/ext/libcouchbase/example/analytics/queries/09-exact-match-lookup-different-shape.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/10-other-query-filters.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/11-equijoin.json +9 -0
- data/ext/libcouchbase/example/analytics/queries/12-equijoin-select-star.json +10 -0
- data/ext/libcouchbase/example/analytics/queries/13-ansi-join.json +8 -0
- data/ext/libcouchbase/example/analytics/queries/14-join-select-values.json +8 -0
- data/ext/libcouchbase/example/analytics/queries/15-nested-outer-join.json +7 -0
- data/ext/libcouchbase/example/analytics/queries/16-theta-join.json +8 -0
- data/ext/libcouchbase/example/analytics/queries/17-existential-quantification.json +9 -0
- data/ext/libcouchbase/example/analytics/queries/18-universal-quantification.json +7 -0
- data/ext/libcouchbase/example/analytics/queries/19-simple-aggregation.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/20-simple-aggregation-unwrapped-value.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/21-simple-aggregation-explicit.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/22-grouping-and-aggregation.json +6 -0
- data/ext/libcouchbase/example/analytics/queries/23-grouping-and-aggregation-with-hint.json +7 -0
- data/ext/libcouchbase/example/analytics/queries/24-grouping-and-limits.json +7 -0
- data/ext/libcouchbase/example/analytics/queries/25-named-parameters.json +7 -0
- data/ext/libcouchbase/example/analytics/queries/26-positional-parameters.json +7 -0
- data/ext/libcouchbase/example/analytics/queries.h +113 -0
- data/ext/libcouchbase/example/crypto/.gitignore +2 -0
- data/ext/libcouchbase/example/crypto/Makefile +13 -0
- data/ext/libcouchbase/example/crypto/common_provider.c +26 -0
- data/ext/libcouchbase/example/crypto/common_provider.h +33 -0
- data/ext/libcouchbase/example/crypto/openssl_symmetric_decrypt.c +144 -0
- data/ext/libcouchbase/example/crypto/openssl_symmetric_encrypt.c +146 -0
- data/ext/libcouchbase/example/crypto/openssl_symmetric_provider.c +271 -0
- data/ext/libcouchbase/example/crypto/openssl_symmetric_provider.h +29 -0
- data/ext/libcouchbase/example/db/db.c +171 -0
- data/ext/libcouchbase/example/db/vb.c +227 -0
- data/ext/libcouchbase/example/fts/.gitignore +1 -0
- data/ext/libcouchbase/example/fts/build-queries.rb +33 -0
- data/ext/libcouchbase/example/fts/fts.c +142 -0
- data/ext/libcouchbase/example/fts/queries/00-simple-text-query.json +12 -0
- data/ext/libcouchbase/example/fts/queries/01-simple-text-query-on-non-default-index.json +9 -0
- data/ext/libcouchbase/example/fts/queries/02-simple-text-query-on-stored-field.json +13 -0
- data/ext/libcouchbase/example/fts/queries/03-match-query-with-facet.json +19 -0
- data/ext/libcouchbase/example/fts/queries/04-docid-query.json +11 -0
- data/ext/libcouchbase/example/fts/queries/05-unanalyzed-term-query-with-fuzziness-level-of-0.json +13 -0
- data/ext/libcouchbase/example/fts/queries/06-unanalyzed-term-query-with-fuzziness-level-of-2.json +14 -0
- data/ext/libcouchbase/example/fts/queries/07-match-phrase-query.json +13 -0
- data/ext/libcouchbase/example/fts/queries/08-phrase-query.json +16 -0
- data/ext/libcouchbase/example/fts/queries/09-query-string-query.json +9 -0
- data/ext/libcouchbase/example/fts/queries/10-conjunction-query.json +21 -0
- data/ext/libcouchbase/example/fts/queries/11-wild-card-query.json +13 -0
- data/ext/libcouchbase/example/fts/queries/12-numeric-range-query.json +11 -0
- data/ext/libcouchbase/example/fts/queries/13-regexp-query.json +13 -0
- data/ext/libcouchbase/example/fts/queries.h +61 -0
- data/ext/libcouchbase/example/instancepool/main.cc +112 -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 +222 -0
- data/ext/libcouchbase/example/mcc/mcc.cc +246 -0
- data/ext/libcouchbase/example/minimal/.gitignore +1 -0
- data/ext/libcouchbase/example/minimal/minimal.c +132 -0
- data/ext/libcouchbase/example/minimal/query.c +185 -0
- data/ext/libcouchbase/example/observe/durability.c +102 -0
- data/ext/libcouchbase/example/observe/observe.c +159 -0
- data/ext/libcouchbase/example/subdoc/subdoc-multi.cc +143 -0
- data/ext/libcouchbase/example/subdoc/subdoc-simple.cc +201 -0
- data/ext/libcouchbase/example/subdoc/subdoc-xattrs.c +286 -0
- data/ext/libcouchbase/example/tick/tick.c +119 -0
- data/ext/libcouchbase/example/tracing/.gitignore +2 -0
- data/ext/libcouchbase/example/tracing/Makefile +8 -0
- data/ext/libcouchbase/example/tracing/cJSON.c +1 -0
- data/ext/libcouchbase/example/tracing/cJSON.h +1 -0
- data/ext/libcouchbase/example/tracing/tracing.c +439 -0
- data/ext/libcouchbase/example/tracing/views.c +444 -0
- data/ext/libcouchbase/example/users/README +48 -0
- data/ext/libcouchbase/example/users/users.c +147 -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/auth.h +297 -0
- data/ext/libcouchbase/include/libcouchbase/cbft.h +151 -0
- data/ext/libcouchbase/include/libcouchbase/cntl-private.h +319 -0
- data/ext/libcouchbase/include/libcouchbase/cntl.h +1418 -0
- data/ext/libcouchbase/include/libcouchbase/configuration.h.in +29 -0
- data/ext/libcouchbase/include/libcouchbase/couchbase.h +4089 -0
- data/ext/libcouchbase/include/libcouchbase/crypto.h +306 -0
- data/ext/libcouchbase/include/libcouchbase/deprecated.h +312 -0
- data/ext/libcouchbase/include/libcouchbase/error.h +680 -0
- data/ext/libcouchbase/include/libcouchbase/http.h +1 -0
- data/ext/libcouchbase/include/libcouchbase/iops.h +1053 -0
- data/ext/libcouchbase/include/libcouchbase/ixmgmt.h +263 -0
- data/ext/libcouchbase/include/libcouchbase/kvbuf.h +137 -0
- data/ext/libcouchbase/include/libcouchbase/metrics.h +79 -0
- data/ext/libcouchbase/include/libcouchbase/n1ql.h +539 -0
- data/ext/libcouchbase/include/libcouchbase/pktfwd.h +270 -0
- data/ext/libcouchbase/include/libcouchbase/plugins/io/bsdio-inl.c +370 -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 +347 -0
- data/ext/libcouchbase/include/libcouchbase/sysdefs.h +98 -0
- data/ext/libcouchbase/include/libcouchbase/tracing.h +437 -0
- data/ext/libcouchbase/include/libcouchbase/vbucket.h +680 -0
- data/ext/libcouchbase/include/libcouchbase/views.h +357 -0
- data/ext/libcouchbase/include/libcouchbase/visibility.h +66 -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 +885 -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 +72 -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 +101 -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 +467 -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 +31 -0
- data/ext/libcouchbase/plugins/io/libev/libev_io_opts.h +66 -0
- data/ext/libcouchbase/plugins/io/libev/plugin-libev.c +289 -0
- data/ext/libcouchbase/plugins/io/libevent/CMakeLists.txt +31 -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 +44 -0
- data/ext/libcouchbase/plugins/io/libuv/libuv_compat.h +218 -0
- data/ext/libcouchbase/plugins/io/libuv/libuv_io_opts.h +118 -0
- data/ext/libcouchbase/plugins/io/libuv/plugin-internal.h +155 -0
- data/ext/libcouchbase/plugins/io/libuv/plugin-libuv.c +709 -0
- data/ext/libcouchbase/plugins/io/select/CMakeLists.txt +13 -0
- data/ext/libcouchbase/plugins/io/select/plugin-select.c +451 -0
- data/ext/libcouchbase/plugins/io/select/select_io_opts.h +39 -0
- data/ext/libcouchbase/src/README.md +101 -0
- data/ext/libcouchbase/src/aspend.h +105 -0
- data/ext/libcouchbase/src/auth-priv.h +85 -0
- data/ext/libcouchbase/src/auth.cc +146 -0
- data/ext/libcouchbase/src/bootstrap.cc +263 -0
- data/ext/libcouchbase/src/bootstrap.h +149 -0
- data/ext/libcouchbase/src/bucketconfig/bc_cccp.cc +450 -0
- data/ext/libcouchbase/src/bucketconfig/bc_file.cc +281 -0
- data/ext/libcouchbase/src/bucketconfig/bc_http.cc +527 -0
- data/ext/libcouchbase/src/bucketconfig/bc_http.h +107 -0
- data/ext/libcouchbase/src/bucketconfig/bc_static.cc +150 -0
- data/ext/libcouchbase/src/bucketconfig/clconfig.h +700 -0
- data/ext/libcouchbase/src/bucketconfig/confmon.cc +403 -0
- data/ext/libcouchbase/src/callbacks.c +380 -0
- data/ext/libcouchbase/src/cbft.cc +253 -0
- data/ext/libcouchbase/src/cntl.cc +1057 -0
- data/ext/libcouchbase/src/config_static.h +176 -0
- data/ext/libcouchbase/src/connspec.cc +555 -0
- data/ext/libcouchbase/src/connspec.h +155 -0
- data/ext/libcouchbase/src/crypto.cc +399 -0
- data/ext/libcouchbase/src/ctx-log-inl.h +44 -0
- data/ext/libcouchbase/src/dns-srv.cc +146 -0
- data/ext/libcouchbase/src/dump.cc +103 -0
- data/ext/libcouchbase/src/errmap.cc +173 -0
- data/ext/libcouchbase/src/errmap.h +271 -0
- data/ext/libcouchbase/src/getconfig.cc +72 -0
- data/ext/libcouchbase/src/gethrtime.c +109 -0
- data/ext/libcouchbase/src/handler.cc +1101 -0
- data/ext/libcouchbase/src/hashtable.c +75 -0
- data/ext/libcouchbase/src/hdr_timings.c +92 -0
- data/ext/libcouchbase/src/hostlist.cc +293 -0
- data/ext/libcouchbase/src/hostlist.h +160 -0
- data/ext/libcouchbase/src/http/http-priv.h +326 -0
- data/ext/libcouchbase/src/http/http.cc +672 -0
- data/ext/libcouchbase/src/http/http.h +1 -0
- data/ext/libcouchbase/src/http/http_io.cc +316 -0
- data/ext/libcouchbase/src/instance.cc +917 -0
- data/ext/libcouchbase/src/internal.h +285 -0
- data/ext/libcouchbase/src/iofactory.c +575 -0
- data/ext/libcouchbase/src/jsparse/parser.cc +445 -0
- data/ext/libcouchbase/src/jsparse/parser.h +159 -0
- data/ext/libcouchbase/src/lcbht/lcbht.cc +177 -0
- data/ext/libcouchbase/src/lcbht/lcbht.h +210 -0
- data/ext/libcouchbase/src/lcbio/connect.cc +603 -0
- data/ext/libcouchbase/src/lcbio/connect.h +400 -0
- data/ext/libcouchbase/src/lcbio/ctx.c +658 -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 +169 -0
- data/ext/libcouchbase/src/lcbio/ioutils.cc +356 -0
- data/ext/libcouchbase/src/lcbio/ioutils.h +144 -0
- data/ext/libcouchbase/src/lcbio/lcbio.h +51 -0
- data/ext/libcouchbase/src/lcbio/manager.cc +579 -0
- data/ext/libcouchbase/src/lcbio/manager.h +195 -0
- data/ext/libcouchbase/src/lcbio/protoctx.c +84 -0
- data/ext/libcouchbase/src/lcbio/rw-inl.h +137 -0
- data/ext/libcouchbase/src/lcbio/ssl.h +159 -0
- data/ext/libcouchbase/src/lcbio/timer-cxx.h +87 -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 +431 -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 +88 -0
- data/ext/libcouchbase/src/mc/compress.cc +171 -0
- data/ext/libcouchbase/src/mc/compress.h +56 -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 +115 -0
- data/ext/libcouchbase/src/mc/mcreq.c +983 -0
- data/ext/libcouchbase/src/mc/mcreq.h +1015 -0
- data/ext/libcouchbase/src/mcserver/mcserver.cc +1055 -0
- data/ext/libcouchbase/src/mcserver/mcserver.h +221 -0
- data/ext/libcouchbase/src/mcserver/negotiate.cc +757 -0
- data/ext/libcouchbase/src/mcserver/negotiate.h +128 -0
- data/ext/libcouchbase/src/mctx-helper.h +62 -0
- data/ext/libcouchbase/src/metrics.cc +132 -0
- data/ext/libcouchbase/src/n1ql/ixmgmt.cc +857 -0
- data/ext/libcouchbase/src/n1ql/n1ql-internal.h +22 -0
- data/ext/libcouchbase/src/n1ql/n1ql.cc +830 -0
- data/ext/libcouchbase/src/n1ql/params.cc +260 -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.cc +365 -0
- data/ext/libcouchbase/src/nodeinfo.cc +184 -0
- data/ext/libcouchbase/src/operations/cbflush.cc +63 -0
- data/ext/libcouchbase/src/operations/counter.cc +117 -0
- data/ext/libcouchbase/src/operations/durability-cas.cc +251 -0
- data/ext/libcouchbase/src/operations/durability-seqno.cc +170 -0
- data/ext/libcouchbase/src/operations/durability.cc +668 -0
- data/ext/libcouchbase/src/operations/durability_internal.h +306 -0
- data/ext/libcouchbase/src/operations/get.cc +409 -0
- data/ext/libcouchbase/src/operations/observe-seqno.cc +94 -0
- data/ext/libcouchbase/src/operations/observe.cc +367 -0
- data/ext/libcouchbase/src/operations/ping.cc +496 -0
- data/ext/libcouchbase/src/operations/pktfwd.cc +86 -0
- data/ext/libcouchbase/src/operations/remove.cc +84 -0
- data/ext/libcouchbase/src/operations/stats.cc +459 -0
- data/ext/libcouchbase/src/operations/store.cc +358 -0
- data/ext/libcouchbase/src/operations/subdoc.cc +614 -0
- data/ext/libcouchbase/src/operations/touch.cc +84 -0
- data/ext/libcouchbase/src/packetutils.h +388 -0
- data/ext/libcouchbase/src/probes.d +182 -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.cc +113 -0
- data/ext/libcouchbase/src/retryq.cc +458 -0
- data/ext/libcouchbase/src/retryq.h +170 -0
- data/ext/libcouchbase/src/ringbuffer.c +442 -0
- data/ext/libcouchbase/src/ringbuffer.h +100 -0
- data/ext/libcouchbase/src/rnd.cc +61 -0
- data/ext/libcouchbase/src/rnd.h +39 -0
- data/ext/libcouchbase/src/settings.c +125 -0
- data/ext/libcouchbase/src/settings.h +273 -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 +11 -0
- data/ext/libcouchbase/src/ssl/ssl_c.c +442 -0
- data/ext/libcouchbase/src/ssl/ssl_common.c +478 -0
- data/ext/libcouchbase/src/ssl/ssl_e.c +421 -0
- data/ext/libcouchbase/src/ssl/ssl_iot_common.h +182 -0
- data/ext/libcouchbase/src/strcodecs/base64.c +307 -0
- data/ext/libcouchbase/src/strcodecs/strcodecs.h +302 -0
- data/ext/libcouchbase/src/timings.c +207 -0
- data/ext/libcouchbase/src/trace.h +117 -0
- data/ext/libcouchbase/src/tracing/span.cc +421 -0
- data/ext/libcouchbase/src/tracing/threshold_logging_tracer.cc +213 -0
- data/ext/libcouchbase/src/tracing/tracer.cc +53 -0
- data/ext/libcouchbase/src/tracing/tracing-internal.h +198 -0
- data/ext/libcouchbase/src/utilities.c +176 -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 +1735 -0
- data/ext/libcouchbase/src/views/docreq.cc +213 -0
- data/ext/libcouchbase/src/views/docreq.h +94 -0
- data/ext/libcouchbase/src/views/viewreq.cc +381 -0
- data/ext/libcouchbase/src/views/viewreq.h +87 -0
- data/ext/libcouchbase/src/wait.cc +156 -0
- data/ext/libcouchbase/tests/CMakeLists.txt +149 -0
- data/ext/libcouchbase/tests/basic/t_base64.cc +109 -0
- data/ext/libcouchbase/tests/basic/t_ccbc103.cc +95 -0
- data/ext/libcouchbase/tests/basic/t_connstr.cc +456 -0
- data/ext/libcouchbase/tests/basic/t_creds.cc +96 -0
- data/ext/libcouchbase/tests/basic/t_ctlcodes.cc +92 -0
- data/ext/libcouchbase/tests/basic/t_host.cc +210 -0
- data/ext/libcouchbase/tests/basic/t_jsparse.cc +82 -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 +17 -0
- data/ext/libcouchbase/tests/basic/t_netbuf.cc +446 -0
- data/ext/libcouchbase/tests/basic/t_packet.cc +215 -0
- data/ext/libcouchbase/tests/basic/t_ringbuffer.cc +278 -0
- data/ext/libcouchbase/tests/basic/t_scram.cc +514 -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_urlencode.cc +132 -0
- data/ext/libcouchbase/tests/check-all.cc +612 -0
- data/ext/libcouchbase/tests/htparse/t_basic.cc +173 -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 +117 -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 +632 -0
- data/ext/libcouchbase/tests/iotests/mock-environment.h +480 -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 +220 -0
- data/ext/libcouchbase/tests/iotests/t_configcache.cc +117 -0
- data/ext/libcouchbase/tests/iotests/t_confmon.cc +223 -0
- data/ext/libcouchbase/tests/iotests/t_durability.cc +1108 -0
- data/ext/libcouchbase/tests/iotests/t_eerrs.cc +121 -0
- data/ext/libcouchbase/tests/iotests/t_errmap.cc +181 -0
- data/ext/libcouchbase/tests/iotests/t_forward.cc +118 -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 +274 -0
- data/ext/libcouchbase/tests/iotests/t_misc.cc +777 -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 +778 -0
- data/ext/libcouchbase/tests/iotests/t_obseqno.cc +156 -0
- data/ext/libcouchbase/tests/iotests/t_regression.cc +321 -0
- data/ext/libcouchbase/tests/iotests/t_sched.cc +87 -0
- data/ext/libcouchbase/tests/iotests/t_serverops.cc +231 -0
- data/ext/libcouchbase/tests/iotests/t_smoke.cc +528 -0
- data/ext/libcouchbase/tests/iotests/t_snappy.cc +316 -0
- data/ext/libcouchbase/tests/iotests/t_subdoc.cc +857 -0
- data/ext/libcouchbase/tests/iotests/t_syncmode.cc +64 -0
- data/ext/libcouchbase/tests/iotests/t_views.cc +417 -0
- data/ext/libcouchbase/tests/iotests/testutil.cc +251 -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 +344 -0
- data/ext/libcouchbase/tests/socktests/socktest.h +447 -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 +159 -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/ketama_expected.json +2562 -0
- data/ext/libcouchbase/tests/vbucket/confdata/map_node_present_nodesext_missing_nodes.json +94 -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/memd_ketama_config.json +31 -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 +386 -0
- data/ext/libcouchbase/tools/CMakeLists.txt +80 -0
- data/ext/libcouchbase/tools/cbc-handlers.h +636 -0
- data/ext/libcouchbase/tools/cbc-n1qlback.cc +496 -0
- data/ext/libcouchbase/tools/cbc-pillowfight.cc +1230 -0
- data/ext/libcouchbase/tools/cbc-proxy.cc +534 -0
- data/ext/libcouchbase/tools/cbc-subdoc.cc +825 -0
- data/ext/libcouchbase/tools/cbc.cc +1928 -0
- data/ext/libcouchbase/tools/common/histogram.cc +44 -0
- data/ext/libcouchbase/tools/common/histogram.h +23 -0
- data/ext/libcouchbase/tools/common/options.cc +451 -0
- data/ext/libcouchbase/tools/common/options.h +90 -0
- data/ext/libcouchbase/tools/docgen/docgen.h +495 -0
- data/ext/libcouchbase/tools/docgen/loc.h +211 -0
- data/ext/libcouchbase/tools/docgen/placeholders.h +211 -0
- data/ext/libcouchbase/tools/docgen/seqgen.h +122 -0
- data/ext/libcouchbase/tools/extract-packets.rb +110 -0
- data/ext/libcouchbase/tools/linenoise/linenoise.c +1199 -0
- data/ext/libcouchbase/tools/linenoise/linenoise.h +73 -0
- data/lib/mt-libcouchbase/bucket.rb +825 -0
- data/lib/mt-libcouchbase/callbacks.rb +69 -0
- data/lib/mt-libcouchbase/connection.rb +896 -0
- data/lib/mt-libcouchbase/design_docs.rb +92 -0
- data/lib/mt-libcouchbase/error.rb +68 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdbase.rb +23 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdcounter.rb +36 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdendure.rb +26 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdfts.rb +24 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdget.rb +30 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdgetreplica.rb +49 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdhttp.rb +58 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdn1ql.rb +40 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdobseqno.rb +33 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdobserve.rb +30 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdstore.rb +40 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdstoredur.rb +45 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdsubdoc.rb +61 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdverbosity.rb +29 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/cmdviewquery.rb +61 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/contigbuf.rb +14 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/create_st.rb +15 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/create_st0.rb +23 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/create_st1.rb +26 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/create_st2.rb +32 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/create_st3.rb +26 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/crst_u.rb +20 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/durability_opts_st_v.rb +11 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/durability_opts_t.rb +14 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/durabilityopt_sv0.rb +63 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/enums.rb +1007 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/fragbuf.rb +18 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/ftshandle.rb +7 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/histogram.rb +34 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/http_request_t.rb +7 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/keybuf.rb +20 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/multicmd_ctx.rb +30 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/mutation_token.rb +17 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/n1qlhandle.rb +7 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/n1qlparams.rb +7 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respbase.rb +29 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respcounter.rb +32 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respendure.rb +49 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respfts.rb +40 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respget.rb +44 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/resphttp.rb +48 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respmcversion.rb +38 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respn1ql.rb +41 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respobseqno.rb +52 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respobserve.rb +41 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respserverbase.rb +32 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respstats.rb +38 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respstore.rb +32 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respstoredur.rb +38 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respsubdoc.rb +35 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/respviewquery.rb +67 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/sdentry.rb +22 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/sdspec.rb +31 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/t.rb +7 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/valbuf.rb +22 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/valbuf_u_buf.rb +14 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase/viewhandle.rb +7 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase.rb +1175 -0
- data/lib/mt-libcouchbase/ext/mt-libcouchbase_libuv.rb +22 -0
- data/lib/mt-libcouchbase/ext/tasks.rb +39 -0
- data/lib/mt-libcouchbase/n1ql.rb +80 -0
- data/lib/mt-libcouchbase/query_full_text.rb +147 -0
- data/lib/mt-libcouchbase/query_n1ql.rb +123 -0
- data/lib/mt-libcouchbase/query_view.rb +135 -0
- data/lib/mt-libcouchbase/results_fiber.rb +281 -0
- data/lib/mt-libcouchbase/results_native.rb +220 -0
- data/lib/mt-libcouchbase/subdoc_request.rb +139 -0
- data/lib/mt-libcouchbase/version.rb +5 -0
- data/lib/mt-libcouchbase.rb +40 -0
- data/mt-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 +260 -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 +873 -0
@@ -0,0 +1,763 @@
|
|
1
|
+
# cbc(1) - Couchbase Client Commandline Utility
|
2
|
+
|
3
|
+
## SYNOPSIS
|
4
|
+
|
5
|
+
`cbc` _COMMAND_ [_OPTIONS_]<br>
|
6
|
+
`cbc help`<br>
|
7
|
+
`cbc version`<br>
|
8
|
+
`cbc cat` _KEYS_ ... [_OPTIONS_]<br>
|
9
|
+
`cbc create` _KEY_ _-V VALUE_ [_OPTIONS_]<br>
|
10
|
+
`cbc create` _KEY_ [_OPTIONS_]<br>
|
11
|
+
`cbc cp` _FILES_ ... [_OPTIONS_]<br>
|
12
|
+
`cbc incr` _KEY_ [_OPTIONS_]<br>
|
13
|
+
`cbc decr` _KEY_ [_OPTIONS_]<br>
|
14
|
+
`cbc touch` _KEY_ [_OPTIONS_]<br>
|
15
|
+
`cbc rm` _KEY_ [_OPTIONS_]<br>
|
16
|
+
`cbc hash` _KEY_ [_OPTIONS_]<br>
|
17
|
+
`cbc stats` _KEYS_ ... [_OPTIONS_]<br>
|
18
|
+
`cbc observe` _KEYS_ ... [_OPTIONS_]<br>
|
19
|
+
`cbc view` _VIEWPATH_ [_OPTIONS_]<br>
|
20
|
+
`cbc lock` _KEY_ [_OPTIONS_]<br>
|
21
|
+
`cbc unlock` _KEY_ _CAS_ [_OPTIONS_]<br>
|
22
|
+
`cbc admin` _-P PASSWORD_ _RESTAPI_ [_OPTIONS_]<br>
|
23
|
+
`cbc bucket-create` _-P PASSWORD_ _NAME_ [_OPTIONS_]<br>
|
24
|
+
`cbc bucket-delete` _-P PASSWORD_ _NAME_ [_OPTIONS_]<br>
|
25
|
+
`cbc bucket-flush` _NAME_ [_OPTIONS_]<br>
|
26
|
+
`cbc role-list` [_OPTIONS_]<br>
|
27
|
+
`cbc user-list` [_OPTIONS_]<br>
|
28
|
+
`cbc user-upsert` _NAME_ [_OPTIONS_]<br>
|
29
|
+
`cbc user-delete` _NAME_ [_OPTIONS_]<br>
|
30
|
+
`cbc connstr` _SPEC_<br>
|
31
|
+
`cbc query` _QUERY_ ... [_OPTIONS_]<br>
|
32
|
+
`cbc write-config` [_OPTIONS_ ...]<br>
|
33
|
+
`cbc strerror` _HEX-OR-DECIMAL-CODE_<br>
|
34
|
+
`cbc ping` [_OPTIONS_ ...]<br>
|
35
|
+
`cbc watch` [_KEYS_ ...] [_OPTIONS_ ...]<br>
|
36
|
+
|
37
|
+
|
38
|
+
## DESCRIPTION
|
39
|
+
|
40
|
+
`cbc` is a utility for communicating with a Couchbase cluster.
|
41
|
+
|
42
|
+
`cbc` should be invoked with the command name first and then a series of command
|
43
|
+
options appropriate for the specific command. `cbc help` will always show the full
|
44
|
+
list of available commands.
|
45
|
+
|
46
|
+
<a name="OPTIONS"></a>
|
47
|
+
## OPTIONS
|
48
|
+
|
49
|
+
Options may be read either from the command line, or from a configuration file
|
50
|
+
(see cbcrc(4)):
|
51
|
+
|
52
|
+
The following common options may be applied to most of the commands
|
53
|
+
|
54
|
+
@@common-options.markdown@@
|
55
|
+
|
56
|
+
<a name="additional-options"></a>
|
57
|
+
## ADDITIONAL OPTIONS
|
58
|
+
|
59
|
+
The following options may be included in the connection string (via the `-U`
|
60
|
+
option) as URI-style query params (e.g.
|
61
|
+
`couchbase://host/bucket?option1=value1&option2=value2`) or as individual
|
62
|
+
key=value pairs passed to the `-D` switch (e.g. `-Doption1=value1
|
63
|
+
-Doption2=value`). The `-D` will internally build the connection string,
|
64
|
+
and is provided as a convenience for options to be easily passed on the
|
65
|
+
command-line
|
66
|
+
|
67
|
+
@@common-additional-options.markdown@@
|
68
|
+
|
69
|
+
## COMMANDS
|
70
|
+
|
71
|
+
The following commands are supported by `cbc`. Unless otherwise specified, each
|
72
|
+
command supports all of the options above.
|
73
|
+
|
74
|
+
### cat
|
75
|
+
|
76
|
+
Write the value of keys to standard output.
|
77
|
+
|
78
|
+
This command requires that at least one key may be passed to it, but may accept
|
79
|
+
multiple keys. The keys should be specified as positional arguments after the
|
80
|
+
command.
|
81
|
+
|
82
|
+
In addition to the options in the [OPTIONS](#OPTIONS) section, the following options are supported:
|
83
|
+
|
84
|
+
* `r`, `--replica`=_all|INDEX_:
|
85
|
+
Read the value from a replica server. The value for this option can either be
|
86
|
+
the string `all` which will cause the client to request the value from each
|
87
|
+
replica, or `INDEX` where `INDEX` is a 0-based replica index.
|
88
|
+
|
89
|
+
* `e`, `--expiry`=_EXPIRATION_:
|
90
|
+
Specify that this operation should be a _get-and-touch_ operation in which the
|
91
|
+
key's expiry time is updated along with retrieving the item.
|
92
|
+
|
93
|
+
|
94
|
+
### create
|
95
|
+
|
96
|
+
### cp
|
97
|
+
|
98
|
+
Create a new item in the cluster, or update the value of an existing item.
|
99
|
+
By default this command will read the value from standard input unless the
|
100
|
+
`--value` option is specified.
|
101
|
+
|
102
|
+
The `cp` command functions the same, except it operates on a list of files. Each file is
|
103
|
+
stored in the cluster under the name specified on the command line.
|
104
|
+
|
105
|
+
In addition to the options in the [OPTIONS](#OPTIONS) section, the following options are supported:
|
106
|
+
|
107
|
+
* `-V`, `--value`=_VALUE_:
|
108
|
+
The value to store in the cluster. If omitted, the value is read from standard input. This
|
109
|
+
option is valid only for the `create` command.
|
110
|
+
|
111
|
+
* `f`, `--flags`=_ITEMFLAGS_:
|
112
|
+
A 32 bit unsigned integer to be stored alongside the value. This number is returned
|
113
|
+
when the item is retrieved again. Other clients commonly use this value to determine
|
114
|
+
the type of item being stored.
|
115
|
+
|
116
|
+
* `e`, `--expiry`=_EXPIRATION_:
|
117
|
+
The number of time in seconds from now at which the item should expire.
|
118
|
+
|
119
|
+
* `M`, `--mode`=_upsert|insert|replace_:
|
120
|
+
Specify the storage mode. Mode can be one of `insert` (store item if it does
|
121
|
+
not yet exist), `replace` (only store item if key already exists), or
|
122
|
+
`upsert` (unconditionally store item)
|
123
|
+
|
124
|
+
* `p`, `--persist-to`=_NUMNODES_:
|
125
|
+
Wait until the item has been persisted to at least `NUMNODES` nodes' disk. If
|
126
|
+
`NUMNODES` is 1 then wait until only the master node has persisted the item for
|
127
|
+
this key. You may not specify a number greater than the number of nodes actually
|
128
|
+
in the cluster.
|
129
|
+
|
130
|
+
* `r` `--replicate-to`=_NREPLICAS_:
|
131
|
+
Wait until the item has been replicated to at least `NREPLICAS` replica nodes.
|
132
|
+
The bucket must be configured with at least one replica, and at least `NREPLICAS`
|
133
|
+
replica nodes must be online.
|
134
|
+
|
135
|
+
|
136
|
+
### observe
|
137
|
+
|
138
|
+
Retrieve persistence and replication information for items.
|
139
|
+
|
140
|
+
This command will print the status of each key to standard error.
|
141
|
+
|
142
|
+
See the [OPTIONS](#OPTIONS) for accepted options
|
143
|
+
|
144
|
+
### incr
|
145
|
+
|
146
|
+
### decr
|
147
|
+
|
148
|
+
These commands increment or decrement a _counter_ item in the cluster. A _counter_
|
149
|
+
is a value stored as an ASCII string which is readable as a number, thus for example
|
150
|
+
`42`.
|
151
|
+
|
152
|
+
These commands will by default refuse to operate on an item which does not exist in
|
153
|
+
the cluster.
|
154
|
+
|
155
|
+
The `incr` and `decr` command differ with how they treat the `--delta` argument. The
|
156
|
+
`incr` command will treat the value as a _positive_ offset and increment the current
|
157
|
+
value by the amount specified, whereas the `decr` command will treat the value as a
|
158
|
+
_negative_ offset and decrement the value by the amount specified.
|
159
|
+
|
160
|
+
In addition to [OPTIONS](#OPTIONS), the following options are supported:
|
161
|
+
|
162
|
+
* `--initial=_DEFAULT_`:
|
163
|
+
Set the initial value for the item if it does not exist in the cluster. The value
|
164
|
+
should be an unsigned 64 bit integer. If this option is not specified and the item
|
165
|
+
does not exist, the operation will fail. If the item _does_ exist, this option is
|
166
|
+
ignored.
|
167
|
+
|
168
|
+
* `--delta`=_DELTA_:
|
169
|
+
Set the absolute delta by which the value should change. If the command is `incr`
|
170
|
+
then the value will be _incremented_ by this amount. If the command is `decr` then
|
171
|
+
the value will be _decremented_ by this amount. The default value for this option is
|
172
|
+
`1`.
|
173
|
+
|
174
|
+
* `-e`, `--expiry`=_EXPIRATION_:
|
175
|
+
Set the expiration time for the key, in terms of seconds from now.
|
176
|
+
|
177
|
+
|
178
|
+
### hash
|
179
|
+
|
180
|
+
Display mapping information for a key.
|
181
|
+
|
182
|
+
This command diplays mapping information about a key. The mapping information
|
183
|
+
indicates which _vBucket_ the key is mapped to, and which server is currently the
|
184
|
+
master node for the given _vBucket_.
|
185
|
+
|
186
|
+
See the [OPTIONS](#OPTIONS) for accepted options
|
187
|
+
|
188
|
+
<a name="lock"></a>
|
189
|
+
### lock
|
190
|
+
|
191
|
+
Lock an item in the cluster.
|
192
|
+
|
193
|
+
This will retrieve and lock an item in the cluster, making it inaccessible for
|
194
|
+
modification until it is unlocked (see [unlock](#unlock)).
|
195
|
+
|
196
|
+
In addition to the common options ([OPTIONS](#OPTIONS)), this command accepts the following
|
197
|
+
options:
|
198
|
+
|
199
|
+
* `e`, `--expiry`=_LOCKTIME_:
|
200
|
+
Specify the amount of time the lock should be held for. If not specified, it will
|
201
|
+
default to the server side maximum of 15 seconds.
|
202
|
+
|
203
|
+
<a name="unlock"></a>
|
204
|
+
### unlock
|
205
|
+
|
206
|
+
Unlock a previously locked item.
|
207
|
+
|
208
|
+
This command accepts two mandatory positional arguments which are the key and _CAS_ value.
|
209
|
+
The _CAS_ value should be specified as printed from the [lock][] command (i.e. with the
|
210
|
+
leading `0x` hexadecimal prefix).
|
211
|
+
|
212
|
+
See the [OPTIONS](#OPTIONS) for accepted options
|
213
|
+
|
214
|
+
|
215
|
+
### rm
|
216
|
+
|
217
|
+
Remove an item from the cluster.
|
218
|
+
|
219
|
+
This command will remove an item from the cluster. If the item does not exist, the
|
220
|
+
operation will fail.
|
221
|
+
|
222
|
+
|
223
|
+
See the [OPTIONS](#OPTIONS) for accepted options
|
224
|
+
|
225
|
+
|
226
|
+
### stats
|
227
|
+
|
228
|
+
Retrieve a list of cluster statistics. If positional arguments are passed to this
|
229
|
+
command, only the statistics classified under those keys will be retrieved. See the
|
230
|
+
server documentation for a full list of possible statistics categories.
|
231
|
+
|
232
|
+
This command will contact each server in the cluster and retrieve that node's own set
|
233
|
+
of statistics.
|
234
|
+
|
235
|
+
The statistics are printed to standard output in the form of `SERVER STATISTIC VALUE`
|
236
|
+
where _SERVER_ is the _host:port_ representation of the node from which has provided this
|
237
|
+
statistic, _STATISTIC_ is the name of the current statistical key, and _VALUE_ is the
|
238
|
+
value for this statistic.
|
239
|
+
|
240
|
+
|
241
|
+
See the [OPTIONS](#OPTIONS) for accepted options
|
242
|
+
|
243
|
+
### watch
|
244
|
+
|
245
|
+
Retrieve a list of cluster statistics, select specified sub-keys and aggregate values
|
246
|
+
across the cluster. Then continuously poll the stats and display the difference with
|
247
|
+
the previous values. If the list of stat sub-keys not specified, the command will use
|
248
|
+
`cmd_total_ops`, `cmd_total_gets`, `cmd_total_sets`.
|
249
|
+
|
250
|
+
In addition to the options in the [OPTIONS](#OPTIONS) section, the following options are supported:
|
251
|
+
* `-n`, `--interval`=_VALUE_:
|
252
|
+
Update interval in seconds (default `1` second).
|
253
|
+
|
254
|
+
### write-config
|
255
|
+
|
256
|
+
Write the configuration file based on arguments passed.
|
257
|
+
|
258
|
+
### strerror
|
259
|
+
|
260
|
+
Decode library error code
|
261
|
+
|
262
|
+
### version
|
263
|
+
|
264
|
+
Display information about the underlying version of _libcouchbase_ to which the
|
265
|
+
`cbc` binary is linked.
|
266
|
+
|
267
|
+
### verbosity
|
268
|
+
|
269
|
+
Set the memcached logging versbosity on the cluster. This affects how the memcached
|
270
|
+
processes write their logs. This command accepts a single positional argument which
|
271
|
+
is a string describing the verbosity level to be set. The options are `detail`, `debug`
|
272
|
+
`info`, and `warning`.
|
273
|
+
|
274
|
+
### ping
|
275
|
+
|
276
|
+
Sends NOOP-like request to every service on each cluster node, and report time it took to response.
|
277
|
+
|
278
|
+
* `--details`:
|
279
|
+
Provide more details about status of the service.
|
280
|
+
|
281
|
+
### mcflush
|
282
|
+
|
283
|
+
Flush a _memcached_ bucket. This command takes no arguments, and will fail if the
|
284
|
+
bucket specified is not a memcached bucket. You may also use [bucket-flush](#bucket-flush)
|
285
|
+
to flush any bucket (including a couchbase bucket). The `mcflush` command may be
|
286
|
+
quicker for memcached buckets, though.
|
287
|
+
|
288
|
+
### view
|
289
|
+
|
290
|
+
Execute an HTTP request against the server's view (CAPI) interface.
|
291
|
+
|
292
|
+
The request may be one to create a design document, view a design document, or query a
|
293
|
+
view.
|
294
|
+
|
295
|
+
To create a design document, the definition of the document (in JSON) should be piped
|
296
|
+
to the command on standard input.
|
297
|
+
|
298
|
+
This command accepts one positional argument which is the _path_ (relative to the
|
299
|
+
bucket) to execute. Thus to query the `brewery_beers` view in the `beer` design
|
300
|
+
document within the `beer-sample` bucket one would do:
|
301
|
+
cbc view -U couchbase://localhost/beer-sample _design/beer/_view/brewery_beers
|
302
|
+
|
303
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options are recognized:
|
304
|
+
|
305
|
+
* `-X`, `--method`=_GET|PUT|POST|DELETE_:
|
306
|
+
Specify the HTTP method to use for the specific request. The default method is `GET`
|
307
|
+
to query a view. To delete an existing design document, specify `DELETE`, and to
|
308
|
+
create a new design document, specify `PUT`.
|
309
|
+
|
310
|
+
### query
|
311
|
+
|
312
|
+
Execute a N1QL Query. The cluster must have at least one query node enabled.
|
313
|
+
|
314
|
+
The query itself is passed as a positional argument on the commandline. The
|
315
|
+
query may contain named placeholders (in the format of `$param`), whose values
|
316
|
+
may be supplied later on using the `--qarg='$param=value'` syntax.
|
317
|
+
|
318
|
+
It is recommended to place the statement in single quotes to avoid shell
|
319
|
+
expansion.
|
320
|
+
|
321
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options
|
322
|
+
are recognized:
|
323
|
+
|
324
|
+
* `-Q`, `--qopt`=_SETTING=VALUE_:
|
325
|
+
Specify additional options controlling the execution of the query. This can
|
326
|
+
be used for example, to set the `scan_consistency` of the query.
|
327
|
+
|
328
|
+
* `-A`, `--qarg`=_PLACEHOLDER=VALUE_:
|
329
|
+
Supply values for placeholders found in the query string. The placeholders
|
330
|
+
must evaluate to valid JSON values.
|
331
|
+
|
332
|
+
* `--prepare`:
|
333
|
+
Prepare query before issuing. Default is FALSE.
|
334
|
+
|
335
|
+
* `--analytics`:
|
336
|
+
Perform query to analytics service. Default is FALSE.
|
337
|
+
|
338
|
+
### admin
|
339
|
+
|
340
|
+
Execute an administrative request against the management REST API.
|
341
|
+
Note that in order to perform an administrative API you will need to provide
|
342
|
+
_administrative_ credentials to `cbc admin`. This means the username and password
|
343
|
+
used to log into the administration console.
|
344
|
+
|
345
|
+
This command accepts a single positional argument which is the REST API endpoint
|
346
|
+
(i.e. HTTP path) to execute.
|
347
|
+
|
348
|
+
If the request requires a _body_, it should be supplied via standard input
|
349
|
+
|
350
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options are recognized:
|
351
|
+
|
352
|
+
* `-X`, `--method`=_GET|PUT|POST|DELETE_:
|
353
|
+
Specify the HTTP method to use for the specific request. The default method is
|
354
|
+
`GET`.
|
355
|
+
|
356
|
+
### bucket-create
|
357
|
+
|
358
|
+
Create a bucket in the cluster.
|
359
|
+
|
360
|
+
This command will create a bucket with the name specified as the lone positional
|
361
|
+
argument on the command line.
|
362
|
+
|
363
|
+
As this is an administrative command, the `--username` and `--password` options should
|
364
|
+
be supplied administrative credentials.
|
365
|
+
|
366
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options are recognized:
|
367
|
+
|
368
|
+
* `--bucket-type`=_couchbase|memcached_:
|
369
|
+
Specify the type of bucket to create. A _couchbase_ bucket has persistence to disk and
|
370
|
+
replication. A _memached_ bucket is in-memory only and does not replicate.
|
371
|
+
|
372
|
+
* `--ram-quota`=_QUOTA_:
|
373
|
+
Specify the maximum amount of memory the bucket should occupy (per node) in megabytes.
|
374
|
+
If not specified, the default is _512_.
|
375
|
+
|
376
|
+
* `--bucket-password`=_PASSWORD_:
|
377
|
+
Specify the password to secure this bucket. If passed, this password will be required
|
378
|
+
by all clients attempting to connect to the bucket. If ommitted, this bucket may be
|
379
|
+
accessible to everyone for both read and write access.
|
380
|
+
|
381
|
+
* `--num-replicas`=_REPLICAS_:
|
382
|
+
Specify the amount of replicas the bucket should have. This will set the number of nodes
|
383
|
+
each item will be replicated to. If not specified the default is _1_.
|
384
|
+
|
385
|
+
|
386
|
+
### bucket-flush
|
387
|
+
|
388
|
+
This command will flush the bucket with the name specified as the lone positional
|
389
|
+
argument on the command line.
|
390
|
+
|
391
|
+
This command does not require administrative level credentials, however it does
|
392
|
+
require that _flush_ be enabled for the bucket.
|
393
|
+
|
394
|
+
See the [OPTIONS](#OPTIONS) for accepted options
|
395
|
+
|
396
|
+
### role-list
|
397
|
+
|
398
|
+
List accessible RBAC user roles in the cluster.
|
399
|
+
|
400
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options are recognized:
|
401
|
+
|
402
|
+
* `-r`, `--raw`:
|
403
|
+
Print unformatted server response in JSON form.
|
404
|
+
|
405
|
+
### user-list
|
406
|
+
|
407
|
+
List users in the cluster.
|
408
|
+
|
409
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options are recognized:
|
410
|
+
|
411
|
+
* `-r`, `--raw`:
|
412
|
+
Print unformatted server response in JSON form.
|
413
|
+
|
414
|
+
### user-upsert
|
415
|
+
|
416
|
+
Create or update a user in the cluster. Takes user ID as an argument.
|
417
|
+
|
418
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options are recognized:
|
419
|
+
|
420
|
+
* `--domain`=_local|remote_:
|
421
|
+
The domain, where user account defined. If not specified, the default is _local_.
|
422
|
+
|
423
|
+
* `--full-name`=_FULL_NAME_:
|
424
|
+
The user's fullname. If not specified, the default is empty string.
|
425
|
+
|
426
|
+
* `--role`=_ROLE_:
|
427
|
+
The role associated with user (can be specified multiple times if needed).
|
428
|
+
|
429
|
+
* `--user-password`=_PASSWORD_:
|
430
|
+
The password for the user.
|
431
|
+
|
432
|
+
### user-delete
|
433
|
+
|
434
|
+
Delete a user in the cluster. Takes user ID as an argument.
|
435
|
+
|
436
|
+
In addition to the [OPTIONS](#OPTIONS) specified above, the following options are recognized:
|
437
|
+
|
438
|
+
* `--domain`=_local|remote_:
|
439
|
+
The domain, where user account defined. If not specified, the default is _local_.
|
440
|
+
|
441
|
+
|
442
|
+
### connstr
|
443
|
+
|
444
|
+
This command will parse a connection string into its constituent parts and
|
445
|
+
display them on the screen. The command takes a single positional argument
|
446
|
+
which is the string to parse.
|
447
|
+
|
448
|
+
## EXAMPLES
|
449
|
+
|
450
|
+
|
451
|
+
### CONNECTION EXAMPLES
|
452
|
+
|
453
|
+
The following shows how to connect to various types of buckets. These examples
|
454
|
+
all show how to retrieve the key `key`. See
|
455
|
+
[OPERATION EXAMPLES](#OPERATION EXAMPLES) for more information on specific
|
456
|
+
sub-commands.
|
457
|
+
|
458
|
+
Connect to a bucket (`a_bucket`) on a cluster on a remote host (for servers version 5.x+).
|
459
|
+
It uses account 'myname' and asks password interactively:
|
460
|
+
|
461
|
+
cbc cat key -U couchbase://192.168.33.101/a_bucket -u myname -P-
|
462
|
+
|
463
|
+
Run against a password-less bucket (`a_bucket`) on a cluster on a remote host (for servers older than 5.x):
|
464
|
+
|
465
|
+
cbc cat key -U couchbase://192.168.33.101/a_bucket
|
466
|
+
|
467
|
+
Connect to an SSL cluster at `secure.net`. The certificate for the cluster is
|
468
|
+
stored locally at `/home/couchbase/couchbase_cert.pem`:
|
469
|
+
|
470
|
+
cbc cat key -U couchbases://secure.net/topsecret_bucket?certpath=/home/couchbase/couchbase_cert.pem
|
471
|
+
|
472
|
+
Connect to an SSL cluster at `secure.net`, ignoring certificate verification.
|
473
|
+
This is insecure but handy for testing:
|
474
|
+
|
475
|
+
cbc cat key -U couchbases://secure.net/topsecret_bucket?ssl=no_verify
|
476
|
+
|
477
|
+
Connect to a password protected bucket (`protected`) on a remote host (for servers older than 5.x):
|
478
|
+
|
479
|
+
cbc cat key -U couchbase://remote.host.net/protected -P-
|
480
|
+
Bucket password:
|
481
|
+
|
482
|
+
Connect to a password protected bucket (for servers older than 5.x), specifying the password on the
|
483
|
+
command line (INSECURE, but useful for testing dummy environments)
|
484
|
+
|
485
|
+
cbc cat key -U couchbase://remote.host.net/protected -P t0ps3cr3t
|
486
|
+
|
487
|
+
Connect to a bucket running on a cluster with a custom REST API port
|
488
|
+
|
489
|
+
cbc cat key -U http://localhost:9000/default
|
490
|
+
|
491
|
+
Connec to bucket running on a cluster with a custom memcached port
|
492
|
+
|
493
|
+
cbc cat key -U couchbase://localhost:12000/default
|
494
|
+
|
495
|
+
Connect to a *memcached* (http://memcached.org)
|
496
|
+
cluster using the binary protocol. A vanilla memcached cluster is not the same
|
497
|
+
as a memcached bucket residing within a couchbase cluster (use the normal
|
498
|
+
`couchbase://` scheme for that):
|
499
|
+
|
500
|
+
cbc cat key -U memcached://host1,host2,host3,host4
|
501
|
+
|
502
|
+
|
503
|
+
Connect to a cluster using the HTTP protocol for bootstrap, and set the
|
504
|
+
operation timeout to 5 seconds
|
505
|
+
|
506
|
+
cbc cat key -U couchbase://host/bucket -Dbootstrap_on=http -Doperation_timeout=5
|
507
|
+
|
508
|
+
|
509
|
+
### OPERATION EXAMPLES
|
510
|
+
|
511
|
+
Store a file to the cluster:
|
512
|
+
|
513
|
+
$ cbc cp mystuff.txt
|
514
|
+
mystuff.txt Stored. CAS=0xe15dbe22efc1e00
|
515
|
+
|
516
|
+
|
517
|
+
Retrieve persistence/replication information about an item (note that _Status_
|
518
|
+
is a set of bits):
|
519
|
+
|
520
|
+
$ cbc observe mystuff.txt
|
521
|
+
mystuff [Master] Status=0x80, CAS=0x0
|
522
|
+
|
523
|
+
|
524
|
+
Display mapping information about keys:
|
525
|
+
|
526
|
+
$cbc hash foo bar baz
|
527
|
+
foo: [vBucket=115, Index=3] Server: cbnode3:11210, CouchAPI: http://cbnode3:8092/default
|
528
|
+
bar: [vBucket=767, Index=0] Server: cbnode1:11210, CouchAPI: http://cbnode1:8092/default
|
529
|
+
baz: [vBucket=36, Index=2] Server: cbnode2:11210, CouchAPI: http://cbnode2:8092/default
|
530
|
+
|
531
|
+
Create a bucket:
|
532
|
+
|
533
|
+
$ cbc bucket-create --bucket-type=memcached --ram-quota=100 --password=letmein -u Administrator -P 123456 mybucket
|
534
|
+
Requesting /pools/default/buckets
|
535
|
+
202
|
536
|
+
Cache-Control: no-cache
|
537
|
+
Content-Length: 0
|
538
|
+
Date: Sun, 22 Jun 2014 22:43:56 GMT
|
539
|
+
Location: /pools/default/buckets/mybucket
|
540
|
+
Pragma: no-cache
|
541
|
+
Server: Couchbase Server
|
542
|
+
|
543
|
+
Flush a bucket:
|
544
|
+
|
545
|
+
$ cbc bucket-flush default
|
546
|
+
Requesting /pools/default/buckets/default/controller/doFlush
|
547
|
+
|
548
|
+
|
549
|
+
200
|
550
|
+
Cache-Control: no-cache
|
551
|
+
Content-Length: 0
|
552
|
+
Date: Sun, 22 Jun 2014 22:53:44 GMT
|
553
|
+
Pragma: no-cache
|
554
|
+
Server: Couchbase Server
|
555
|
+
|
556
|
+
Delete a bucket:
|
557
|
+
|
558
|
+
$ cbc bucket-delete mybucket -P123456
|
559
|
+
Requesting /pools/default/buckets/mybucket
|
560
|
+
200
|
561
|
+
Cache-Control: no-cache
|
562
|
+
Content-Length: 0
|
563
|
+
Date: Sun, 22 Jun 2014 22:55:58 GMT
|
564
|
+
Pragma: no-cache
|
565
|
+
Server: Couchbase Server
|
566
|
+
|
567
|
+
Use `cbc stats` to determine the minimum and maximum timeouts for a lock operation:
|
568
|
+
|
569
|
+
$ cbc stats | grep ep_getl
|
570
|
+
localhost:11210 ep_getl_default_timeout 15
|
571
|
+
localhost:11210 ep_getl_max_timeout 30
|
572
|
+
|
573
|
+
|
574
|
+
Create a design document:
|
575
|
+
|
576
|
+
$ echo '{"views":{"all":{"map":"function(doc,meta){emit(meta.id,null)}"}}}' | cbc view -X PUT _design/blog
|
577
|
+
201
|
578
|
+
Cache-Control: must-revalidate
|
579
|
+
Content-Length: 32
|
580
|
+
Content-Type: application/json
|
581
|
+
Date: Sun, 22 Jun 2014 23:03:40 GMT
|
582
|
+
Location: http://localhost:8092/default/_design/blog
|
583
|
+
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
|
584
|
+
{"ok":true,"id":"_design/blog"}
|
585
|
+
|
586
|
+
|
587
|
+
Query a view:
|
588
|
+
|
589
|
+
$ cbc view _design/blog/_view/all?limit=5
|
590
|
+
200
|
591
|
+
Cache-Control: must-revalidate
|
592
|
+
Content-Type: application/json
|
593
|
+
Date: Sun, 22 Jun 2014 23:06:09 GMT
|
594
|
+
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
|
595
|
+
Transfer-Encoding: chunked
|
596
|
+
{"total_rows":20,"rows":[
|
597
|
+
{"id":"bin","key":"bin","value":null},
|
598
|
+
{"id":"check-all-libev-unit-tests.log","key":"check-all-libev-unit-tests.log","value":null},
|
599
|
+
{"id":"check-all-libevent-unit-tests.log","key":"check-all-libevent-unit-tests.log","value":null},
|
600
|
+
{"id":"check-all-select-unit-tests.log","key":"check-all-select-unit-tests.log","value":null},
|
601
|
+
{"id":"cmake_install.cmake","key":"cmake_install.cmake","value":null}
|
602
|
+
]
|
603
|
+
}
|
604
|
+
|
605
|
+
|
606
|
+
Issue a N1QL query:
|
607
|
+
|
608
|
+
$ cbc query 'SELECT * FROM `travel-sample` WHERE type="airport" AND city=$city' -Qscan_consistency=request_plus -A'$city=\"Reno\"'
|
609
|
+
|
610
|
+
|
611
|
+
Ping cluster services:
|
612
|
+
|
613
|
+
$ cbc ping --details -Ucouchbase://192.168.1.101
|
614
|
+
{
|
615
|
+
"version" : 1,
|
616
|
+
"config_rev" : 54,
|
617
|
+
"id" : "0x1d67af0",
|
618
|
+
"sdk" : "libcouchbase/2.8.4",
|
619
|
+
"services" : {
|
620
|
+
"fts" : [
|
621
|
+
{
|
622
|
+
"id" : "0x1d75e90",
|
623
|
+
"latency_us" : 1500,
|
624
|
+
"local" : "192.168.1.12:35232",
|
625
|
+
"remote" : "192.168.1.101:8094",
|
626
|
+
"status" : "ok"
|
627
|
+
},
|
628
|
+
{
|
629
|
+
"id" : "0x1da6800",
|
630
|
+
"latency_us" : 2301,
|
631
|
+
"local" : "192.168.1.12:40344",
|
632
|
+
"remote" : "192.168.1.103:8094",
|
633
|
+
"status" : "ok"
|
634
|
+
},
|
635
|
+
{
|
636
|
+
"id" : "0x1da3270",
|
637
|
+
"latency_us" : 2820,
|
638
|
+
"local" : "192.168.1.12:42730",
|
639
|
+
"remote" : "192.168.1.102:8094",
|
640
|
+
"status" : "ok"
|
641
|
+
},
|
642
|
+
{
|
643
|
+
"details" : "LCB_ENETUNREACH (0x31): The remote host was unreachable - is your network OK?",
|
644
|
+
"latency_us" : 3071733,
|
645
|
+
"remote" : "192.168.1.104:8094",
|
646
|
+
"status" : "error"
|
647
|
+
}
|
648
|
+
],
|
649
|
+
"kv" : [
|
650
|
+
{
|
651
|
+
"id" : "0x1d6bde0",
|
652
|
+
"latency_us" : 3700,
|
653
|
+
"local" : "192.168.1.12:42006",
|
654
|
+
"remote" : "192.168.1.101:11210",
|
655
|
+
"scope" : "default",
|
656
|
+
"status" : "ok"
|
657
|
+
},
|
658
|
+
{
|
659
|
+
"id" : "0x1dadcf0",
|
660
|
+
"latency_us" : 5509,
|
661
|
+
"local" : "192.168.1.12:39936",
|
662
|
+
"remote" : "192.168.1.103:11210",
|
663
|
+
"scope" : "default",
|
664
|
+
"status" : "ok"
|
665
|
+
},
|
666
|
+
{
|
667
|
+
"id" : "0x1dac500",
|
668
|
+
"latency_us" : 5594,
|
669
|
+
"local" : "192.168.1.12:33868",
|
670
|
+
"remote" : "192.168.1.102:11210",
|
671
|
+
"scope" : "default",
|
672
|
+
"status" : "ok"
|
673
|
+
},
|
674
|
+
{
|
675
|
+
"latency_us" : 2501688,
|
676
|
+
"remote" : "192.168.1.104:11210",
|
677
|
+
"scope" : "default",
|
678
|
+
"status" : "timeout"
|
679
|
+
}
|
680
|
+
],
|
681
|
+
"n1ql" : [
|
682
|
+
{
|
683
|
+
"id" : "0x1d7f280",
|
684
|
+
"latency_us" : 3235,
|
685
|
+
"local" : "192.168.1.12:54210",
|
686
|
+
"remote" : "192.168.1.101:8093",
|
687
|
+
"status" : "ok"
|
688
|
+
},
|
689
|
+
{
|
690
|
+
"id" : "0x1d76f20",
|
691
|
+
"latency_us" : 4625,
|
692
|
+
"local" : "192.168.1.12:58454",
|
693
|
+
"remote" : "192.168.1.102:8093",
|
694
|
+
"status" : "ok"
|
695
|
+
},
|
696
|
+
{
|
697
|
+
"id" : "0x1da44b0",
|
698
|
+
"latency_us" : 4477,
|
699
|
+
"local" : "192.168.1.12:36678",
|
700
|
+
"remote" : "192.168.1.103:8093",
|
701
|
+
"status" : "ok"
|
702
|
+
},
|
703
|
+
{
|
704
|
+
"details" : "LCB_ENETUNREACH (0x31): The remote host was unreachable - is your network OK?",
|
705
|
+
"latency_us" : 3071843,
|
706
|
+
"remote" : "192.168.1.104:8093",
|
707
|
+
"status" : "error"
|
708
|
+
}
|
709
|
+
],
|
710
|
+
"views" : [
|
711
|
+
{
|
712
|
+
"id" : "0x1da55c0",
|
713
|
+
"latency_us" : 1762,
|
714
|
+
"local" : "192.168.1.12:52166",
|
715
|
+
"remote" : "192.168.1.103:8092",
|
716
|
+
"status" : "ok"
|
717
|
+
},
|
718
|
+
{
|
719
|
+
"id" : "0x1da20d0",
|
720
|
+
"latency_us" : 2016,
|
721
|
+
"local" : "192.168.1.12:59420",
|
722
|
+
"remote" : "192.168.1.102:8092",
|
723
|
+
"status" : "ok"
|
724
|
+
},
|
725
|
+
{
|
726
|
+
"id" : "0x1d6a740",
|
727
|
+
"latency_us" : 2567,
|
728
|
+
"local" : "192.168.1.12:38614",
|
729
|
+
"remote" : "192.168.1.101:8092",
|
730
|
+
"status" : "ok"
|
731
|
+
},
|
732
|
+
{
|
733
|
+
"details" : "LCB_ENETUNREACH (0x31): The remote host was unreachable - is your network OK?",
|
734
|
+
"latency_us" : 3071798,
|
735
|
+
"remote" : "192.168.1.104:8092",
|
736
|
+
"status" : "error"
|
737
|
+
}
|
738
|
+
]
|
739
|
+
}
|
740
|
+
}
|
741
|
+
|
742
|
+
|
743
|
+
## FILES
|
744
|
+
|
745
|
+
cbc(1) and cbc-pillowfight(1) may also read options from cbcrc(4). The default
|
746
|
+
path for `cbcrc` is `$HOME/.cbcrc`, but may be overridden by setting the
|
747
|
+
`CBC_CONFIG` evironment variable to an alternate path.
|
748
|
+
|
749
|
+
## BUGS
|
750
|
+
|
751
|
+
The options in this utility and their behavior are subject to change. This script
|
752
|
+
should be used for experiemntation only and not inside production scripts.
|
753
|
+
|
754
|
+
|
755
|
+
## SEE ALSO
|
756
|
+
|
757
|
+
cbc-pillowfight(1), cbcrc(4)
|
758
|
+
|
759
|
+
|
760
|
+
## History
|
761
|
+
|
762
|
+
The cbc command first appeared in version 0.3.0 of the library. It was significantly
|
763
|
+
rewritten in version 2.4.0
|