Couchbase C Client  3.0.4
Asynchronous C Client for Couchbase
couchbase.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /*
3  * Copyright 2010-2020 Couchbase, Inc.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef LIBCOUCHBASE_COUCHBASE_H
19 #define LIBCOUCHBASE_COUCHBASE_H 1
20 
26 struct lcb_st;
27 
35 typedef struct lcb_st lcb_INSTANCE;
36 typedef struct lcb_HTTP_HANDLE_ lcb_HTTP_HANDLE;
37 
38 #include <stddef.h>
39 #include <time.h>
40 #include <stdarg.h>
41 #include <stdio.h>
42 #include <libcouchbase/sysdefs.h>
43 #include <libcouchbase/assert.h>
44 #include <libcouchbase/visibility.h>
45 #include <libcouchbase/error.h>
46 #include <libcouchbase/iops.h>
47 #include <libcouchbase/configuration.h>
48 #include <libcouchbase/kvbuf.h>
49 #include <libcouchbase/auth.h>
50 #include <libcouchbase/tracing.h>
51 #include <libcouchbase/logger.h>
52 #include <libcouchbase/cntl.h>
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 /******************************************************************************
59  ******************************************************************************
60  ******************************************************************************
61  ** INITIALIZATION **
62  ******************************************************************************
63  ******************************************************************************
64  ******************************************************************************/
65 
239 typedef enum {
243  LCB_BTYPE_MEMCACHED = 0x03
245 
246 typedef enum {
247  LCB_CONFIG_TRANSPORT_LIST_END = 0,
248  LCB_CONFIG_TRANSPORT_HTTP = 1,
249  LCB_CONFIG_TRANSPORT_CCCP,
250  LCB_CONFIG_TRANSPORT_MAX
251 } lcb_BOOTSTRAP_TRANSPORT;
252 
254 typedef enum {
256  LCB_TYPE_CLUSTER = 0x01
258 
259 typedef struct lcb_CREATEOPTS_ lcb_CREATEOPTS;
260 
261 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_create(lcb_CREATEOPTS **options, lcb_INSTANCE_TYPE type);
262 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_destroy(lcb_CREATEOPTS *options);
263 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_connstr(lcb_CREATEOPTS *options, const char *connstr, size_t connstr_len);
264 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_bucket(lcb_CREATEOPTS *options, const char *bucket, size_t bucket_len);
265 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_logger(lcb_CREATEOPTS *options, const lcb_LOGGER *logger);
266 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_credentials(lcb_CREATEOPTS *options, const char *username,
267  size_t username_len, const char *password, size_t password_len);
268 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_authenticator(lcb_CREATEOPTS *options, lcb_AUTHENTICATOR *auth);
269 LIBCOUCHBASE_API lcb_STATUS lcb_createopts_io(lcb_CREATEOPTS *options, struct lcb_io_opt_st *io);
270 
314 LIBCOUCHBASE_API
315 lcb_STATUS lcb_create(lcb_INSTANCE **instance, const lcb_CREATEOPTS *options);
316 
339 LIBCOUCHBASE_API
341 
351 typedef void (*lcb_bootstrap_callback)(lcb_INSTANCE *instance, lcb_STATUS err);
352 
363 LIBCOUCHBASE_API
365 
378 LIBCOUCHBASE_API
380 
389 LIBCOUCHBASE_API
410 typedef struct {
411  uint64_t uuid_;
412  uint64_t seqno_;
413  uint16_t vbid_;
414 } lcb_MUTATION_TOKEN;
415 
416 LIBCOUCHBASE_API int lcb_mutation_token_is_valid(const lcb_MUTATION_TOKEN *token);
417 
427 typedef enum {
430 
437 
440 
444 
448 
450  LCB_RESP_F_ERRINFO = 0x20
452 
466 typedef enum {
483  LCB_CALLBACK_STOREDUR,
485  LCB_CALLBACK_SDMUTATE,
492  LCB_CALLBACK__MAX /* Number of callbacks */
494 
495 /* The following callback types cannot be set using lcb_install_callback(),
496  * however, their value is passed along as the second argument of their
497  * respective callbacks. This allows you to still use the same callback,
498  * differentiating their meaning by the type. */
499 
501 #define LCB_CALLBACK_VIEWQUERY -1
502 
504 #define LCB_CALLBACK_QUERY -2
505 
507 #define LCB_CALLBACK_IXMGMT -3
508 
510 #define LCB_CALLBACK_ANALYTICS -4
511 
513 #define LCB_CALLBACK_SEARCH -5
514 
515 #define LCB_CALLBACK_OPEN -6
516 
521 typedef enum {
522  LCB_DURABILITYLEVEL_NONE = 0x00,
539 
540 typedef struct lcb_CMDBASE_ lcb_CMDBASE;
541 typedef struct lcb_RESPBASE_ lcb_RESPBASE;
542 
551 typedef void (*lcb_RESPCALLBACK)(lcb_INSTANCE *instance, int cbtype, const lcb_RESPBASE *resp);
552 
574 LIBCOUCHBASE_API
576 
589 LIBCOUCHBASE_API
591 
598 LIBCOUCHBASE_API
599 const char *lcb_strcbtype(int cbtype);
600 
601 
685 typedef struct lcb_RESPGET_ lcb_RESPGET;
686 
687 LIBCOUCHBASE_API lcb_STATUS lcb_respget_status(const lcb_RESPGET *resp);
688 LIBCOUCHBASE_API lcb_STATUS lcb_respget_error_context(const lcb_RESPGET *resp, const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
689 LIBCOUCHBASE_API lcb_STATUS lcb_respget_cookie(const lcb_RESPGET *resp, void **cookie);
690 LIBCOUCHBASE_API lcb_STATUS lcb_respget_cas(const lcb_RESPGET *resp, uint64_t *cas);
691 LIBCOUCHBASE_API lcb_STATUS lcb_respget_datatype(const lcb_RESPGET *resp, uint8_t *datatype);
692 LIBCOUCHBASE_API lcb_STATUS lcb_respget_flags(const lcb_RESPGET *resp, uint32_t *flags);
693 LIBCOUCHBASE_API lcb_STATUS lcb_respget_key(const lcb_RESPGET *resp, const char **key, size_t *key_len);
694 LIBCOUCHBASE_API lcb_STATUS lcb_respget_value(const lcb_RESPGET *resp, const char **value, size_t *value_len);
695 
696 typedef struct lcb_CMDGET_ lcb_CMDGET;
697 
698 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_create(lcb_CMDGET **cmd);
699 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_destroy(lcb_CMDGET *cmd);
700 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_parent_span(lcb_CMDGET *cmd, lcbtrace_SPAN *span);
701 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_collection(lcb_CMDGET *cmd, const char *scope, size_t scope_len,
702  const char *collection, size_t collection_len);
703 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_key(lcb_CMDGET *cmd, const char *key, size_t key_len);
704 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_expiry(lcb_CMDGET *cmd, uint32_t expiration);
705 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_locktime(lcb_CMDGET *cmd, uint32_t duration);
706 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_timeout(lcb_CMDGET *cmd, uint32_t timeout);
707 
708 LIBCOUCHBASE_API lcb_STATUS lcb_get(lcb_INSTANCE *instance, void *cookie, const lcb_CMDGET *cmd);
776 typedef enum {
777  LCB_REPLICA_MODE_ANY = 0x00,
778  LCB_REPLICA_MODE_ALL = 0x01,
779  LCB_REPLICA_MODE_IDX0 = 0x02,
780  LCB_REPLICA_MODE_IDX1 = 0x03,
781  LCB_REPLICA_MODE_IDX2 = 0x04,
782  LCB_REPLICA_MODE__MAX
784 
785 typedef struct lcb_RESPGETREPLICA_ lcb_RESPGETREPLICA;
786 
787 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_status(const lcb_RESPGETREPLICA *resp);
788 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_error_context(const lcb_RESPGETREPLICA *resp,
789  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
790 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_cookie(const lcb_RESPGETREPLICA *resp, void **cookie);
791 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_cas(const lcb_RESPGETREPLICA *resp, uint64_t *cas);
792 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_datatype(const lcb_RESPGETREPLICA *resp, uint8_t *datatype);
793 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_flags(const lcb_RESPGETREPLICA *resp, uint32_t *flags);
794 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_key(const lcb_RESPGETREPLICA *resp, const char **key, size_t *key_len);
795 LIBCOUCHBASE_API lcb_STATUS lcb_respgetreplica_value(const lcb_RESPGETREPLICA *resp, const char **value,
796  size_t *value_len);
797 LIBCOUCHBASE_API int lcb_respgetreplica_is_final(const lcb_RESPGETREPLICA *resp);
798 
799 typedef struct lcb_CMDGETREPLICA_ lcb_CMDGETREPLICA;
800 
801 LIBCOUCHBASE_API lcb_STATUS lcb_cmdgetreplica_create(lcb_CMDGETREPLICA **cmd, lcb_REPLICA_MODE mode);
802 LIBCOUCHBASE_API lcb_STATUS lcb_cmdgetreplica_destroy(lcb_CMDGETREPLICA *cmd);
803 LIBCOUCHBASE_API lcb_STATUS lcb_cmdgetreplica_parent_span(lcb_CMDGETREPLICA *cmd, lcbtrace_SPAN *span);
804 LIBCOUCHBASE_API lcb_STATUS lcb_cmdgetreplica_collection(lcb_CMDGETREPLICA *cmd, const char *scope, size_t scope_len,
805  const char *collection, size_t collection_len);
806 LIBCOUCHBASE_API lcb_STATUS lcb_cmdgetreplica_key(lcb_CMDGETREPLICA *cmd, const char *key, size_t key_len);
807 LIBCOUCHBASE_API lcb_STATUS lcb_cmdgetreplica_timeout(lcb_CMDGETREPLICA *cmd, uint32_t timeout);
808 LIBCOUCHBASE_API lcb_STATUS lcb_getreplica(lcb_INSTANCE *instance, void *cookie, const lcb_CMDGETREPLICA *cmd);
809 
812 typedef struct lcb_RESPEXISTS_ lcb_RESPEXISTS;
813 
814 LIBCOUCHBASE_API lcb_STATUS lcb_respexists_status(const lcb_RESPEXISTS *resp);
815 LIBCOUCHBASE_API int lcb_respexists_is_found(const lcb_RESPEXISTS *resp);
816 LIBCOUCHBASE_API lcb_STATUS lcb_respexists_error_context(const lcb_RESPEXISTS *resp,
817  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
818 LIBCOUCHBASE_API lcb_STATUS lcb_respexists_cookie(const lcb_RESPEXISTS *resp, void **cookie);
819 LIBCOUCHBASE_API lcb_STATUS lcb_respexists_cas(const lcb_RESPEXISTS *resp, uint64_t *cas);
820 LIBCOUCHBASE_API lcb_STATUS lcb_respexists_key(const lcb_RESPEXISTS *resp, const char **key, size_t *key_len);
821 
822 typedef struct lcb_CMDEXISTS_ lcb_CMDEXISTS;
823 
824 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_create(lcb_CMDEXISTS **cmd);
825 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_destroy(lcb_CMDEXISTS *cmd);
826 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_parent_span(lcb_CMDEXISTS *cmd, lcbtrace_SPAN *span);
827 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_collection(lcb_CMDEXISTS *cmd, const char *scope, size_t scope_len,
828  const char *collection, size_t collection_len);
829 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_key(lcb_CMDEXISTS *cmd, const char *key, size_t key_len);
830 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_timeout(lcb_CMDEXISTS *cmd, uint32_t timeout);
831 
832 LIBCOUCHBASE_API lcb_STATUS lcb_exists(lcb_INSTANCE *instance, void *cookie, const lcb_CMDEXISTS *cmd);
833 
848 typedef enum {
858 
864 
870 
877 
881  LCB_STORE_PREPEND = 0x05
883 
941 typedef struct lcb_RESPSTORE_ lcb_RESPSTORE;
942 
943 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_status(const lcb_RESPSTORE *resp);
944 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_error_context(const lcb_RESPSTORE *resp,
945  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
946 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_cookie(const lcb_RESPSTORE *resp, void **cookie);
947 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_cas(const lcb_RESPSTORE *resp, uint64_t *cas);
948 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_key(const lcb_RESPSTORE *resp, const char **key, size_t *key_len);
949 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_operation(const lcb_RESPSTORE *resp, lcb_STORE_OPERATION *operation);
950 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_mutation_token(const lcb_RESPSTORE *resp, lcb_MUTATION_TOKEN *token);
951 
952 LIBCOUCHBASE_API int lcb_respstore_observe_attached(const lcb_RESPSTORE *resp);
953 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_observe_stored(const lcb_RESPSTORE *resp, int *store_ok);
954 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_observe_master_exists(const lcb_RESPSTORE *resp, int *master_exists);
955 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_observe_master_persisted(const lcb_RESPSTORE *resp, int *master_persisted);
956 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_observe_num_responses(const lcb_RESPSTORE *resp, uint16_t *num_responses);
957 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_observe_num_persisted(const lcb_RESPSTORE *resp, uint16_t *num_persisted);
958 LIBCOUCHBASE_API lcb_STATUS lcb_respstore_observe_num_replicated(const lcb_RESPSTORE *resp, uint16_t *num_replicated);
959 
960 typedef struct lcb_CMDSTORE_ lcb_CMDSTORE;
961 
962 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_create(lcb_CMDSTORE **cmd, lcb_STORE_OPERATION operation);
963 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_destroy(lcb_CMDSTORE *cmd);
964 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_parent_span(lcb_CMDSTORE *cmd, lcbtrace_SPAN *span);
965 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_collection(lcb_CMDSTORE *cmd, const char *scope, size_t scope_len,
966  const char *collection, size_t collection_len);
967 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_key(lcb_CMDSTORE *cmd, const char *key, size_t key_len);
968 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_value(lcb_CMDSTORE *cmd, const char *value, size_t value_len);
969 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_value_iov(lcb_CMDSTORE *cmd, const lcb_IOV *value, size_t value_len);
970 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_expiry(lcb_CMDSTORE *cmd, uint32_t expiration);
971 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_cas(lcb_CMDSTORE *cmd, uint64_t cas);
972 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_flags(lcb_CMDSTORE *cmd, uint32_t flags);
973 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_datatype(lcb_CMDSTORE *cmd, uint8_t datatype);
974 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_durability(lcb_CMDSTORE *cmd, lcb_DURABILITY_LEVEL level);
975 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_durability_observe(lcb_CMDSTORE *cmd, int persist_to, int replicate_to);
976 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_timeout(lcb_CMDSTORE *cmd, uint32_t timeout);
977 LIBCOUCHBASE_API lcb_STATUS lcb_store(lcb_INSTANCE *instance, void *cookie, const lcb_CMDSTORE *cmd);
988 typedef void (*lcb_open_callback)(lcb_INSTANCE *instance, lcb_STATUS err);
995 LIBCOUCHBASE_API lcb_open_callback lcb_set_open_callback(lcb_INSTANCE *instance, lcb_open_callback callback);
996 
1006 LIBCOUCHBASE_API lcb_STATUS lcb_open(lcb_INSTANCE *instance, const char *bucket, size_t bucket_len);
1062 typedef struct lcb_RESPREMOVE_ lcb_RESPREMOVE;
1063 
1064 LIBCOUCHBASE_API lcb_STATUS lcb_respremove_status(const lcb_RESPREMOVE *resp);
1065 LIBCOUCHBASE_API lcb_STATUS lcb_respremove_error_context(const lcb_RESPREMOVE *resp,
1066  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
1067 LIBCOUCHBASE_API lcb_STATUS lcb_respremove_cookie(const lcb_RESPREMOVE *resp, void **cookie);
1068 LIBCOUCHBASE_API lcb_STATUS lcb_respremove_cas(const lcb_RESPREMOVE *resp, uint64_t *cas);
1069 LIBCOUCHBASE_API lcb_STATUS lcb_respremove_key(const lcb_RESPREMOVE *resp, const char **key, size_t *key_len);
1070 LIBCOUCHBASE_API lcb_STATUS lcb_respremove_mutation_token(const lcb_RESPREMOVE *resp, lcb_MUTATION_TOKEN *token);
1071 
1072 typedef struct lcb_CMDREMOVE_ lcb_CMDREMOVE;
1073 
1074 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_create(lcb_CMDREMOVE **cmd);
1075 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_destroy(lcb_CMDREMOVE *cmd);
1076 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_parent_span(lcb_CMDREMOVE *cmd, lcbtrace_SPAN *span);
1077 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_collection(lcb_CMDREMOVE *cmd, const char *scope, size_t scope_len,
1078  const char *collection, size_t collection_len);
1079 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_key(lcb_CMDREMOVE *cmd, const char *key, size_t key_len);
1080 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_cas(lcb_CMDREMOVE *cmd, uint64_t cas);
1081 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_durability(lcb_CMDREMOVE *cmd, lcb_DURABILITY_LEVEL level);
1082 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_timeout(lcb_CMDREMOVE *cmd, uint32_t timeout);
1083 LIBCOUCHBASE_API lcb_STATUS lcb_remove(lcb_INSTANCE *instance, void *cookie, const lcb_CMDREMOVE *cmd);
1084 
1146 typedef struct lcb_RESPCOUNTER_ lcb_RESPCOUNTER;
1147 
1148 LIBCOUCHBASE_API lcb_STATUS lcb_respcounter_status(const lcb_RESPCOUNTER *resp);
1149 LIBCOUCHBASE_API lcb_STATUS lcb_respcounter_error_context(const lcb_RESPCOUNTER *resp,
1150  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
1151 LIBCOUCHBASE_API lcb_STATUS lcb_respcounter_cookie(const lcb_RESPCOUNTER *resp, void **cookie);
1152 LIBCOUCHBASE_API lcb_STATUS lcb_respcounter_cas(const lcb_RESPCOUNTER *resp, uint64_t *cas);
1153 LIBCOUCHBASE_API lcb_STATUS lcb_respcounter_key(const lcb_RESPCOUNTER *resp, const char **key, size_t *key_len);
1154 LIBCOUCHBASE_API lcb_STATUS lcb_respcounter_mutation_token(const lcb_RESPCOUNTER *resp, lcb_MUTATION_TOKEN *token);
1155 LIBCOUCHBASE_API lcb_STATUS lcb_respcounter_value(const lcb_RESPCOUNTER *resp, uint64_t *value);
1156 
1157 typedef struct lcb_CMDCOUNTER_ lcb_CMDCOUNTER;
1158 
1159 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_create(lcb_CMDCOUNTER **cmd);
1160 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_destroy(lcb_CMDCOUNTER *cmd);
1161 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_parent_span(lcb_CMDCOUNTER *cmd, lcbtrace_SPAN *span);
1162 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_collection(lcb_CMDCOUNTER *cmd, const char *scope, size_t scope_len,
1163  const char *collection, size_t collection_len);
1164 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_key(lcb_CMDCOUNTER *cmd, const char *key, size_t key_len);
1165 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_expiry(lcb_CMDCOUNTER *cmd, uint32_t expiration);
1166 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_delta(lcb_CMDCOUNTER *cmd, int64_t number);
1167 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_initial(lcb_CMDCOUNTER *cmd, uint64_t number);
1168 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_durability(lcb_CMDCOUNTER *cmd, lcb_DURABILITY_LEVEL level);
1169 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_cas(lcb_CMDCOUNTER *cmd, uint64_t cas);
1170 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_timeout(lcb_CMDCOUNTER *cmd, uint32_t timeout);
1171 LIBCOUCHBASE_API lcb_STATUS lcb_counter(lcb_INSTANCE *instance, void *cookie, const lcb_CMDCOUNTER *cmd);
1172 
1175 /* @ingroup lcb-kv-api
1176  * @defgroup lcb-lock Lock/Unlock
1177  * @details Documents may be locked and unlocked on the server. While a document
1178  * is locked, any attempt to modify it (or lock it again) will fail.
1179  *
1180  * @note Locks are not persistent across nodes (if a node fails over, the lock
1181  * is not transferred to a replica).
1182  * @note The recommended way to manage access and concurrency control for
1183  * documents in Couchbase is through the CAS, which can also be considered
1184  * a form of opportunistic locking.
1185  *
1186  * @par Locking an item
1187  * There is no exclusive function to lock an item. Locking an item is done
1188  * using @ref lcb_get(), by setting the lcb_cmdget_locktime.
1189  *
1190  * @addtogroup lcb-lock
1191  * @{
1192  */
1193 
1229 typedef struct lcb_RESPUNLOCK_ lcb_RESPUNLOCK;
1230 
1231 LIBCOUCHBASE_API lcb_STATUS lcb_respunlock_status(const lcb_RESPUNLOCK *resp);
1232 LIBCOUCHBASE_API lcb_STATUS lcb_respunlock_error_context(const lcb_RESPUNLOCK *resp,
1233  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
1234 LIBCOUCHBASE_API lcb_STATUS lcb_respunlock_cookie(const lcb_RESPUNLOCK *resp, void **cookie);
1235 LIBCOUCHBASE_API lcb_STATUS lcb_respunlock_cas(const lcb_RESPUNLOCK *resp, uint64_t *cas);
1236 LIBCOUCHBASE_API lcb_STATUS lcb_respunlock_key(const lcb_RESPUNLOCK *resp, const char **key, size_t *key_len);
1237 
1238 typedef struct lcb_CMDUNLOCK_ lcb_CMDUNLOCK;
1239 
1240 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_create(lcb_CMDUNLOCK **cmd);
1241 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_destroy(lcb_CMDUNLOCK *cmd);
1242 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_parent_span(lcb_CMDUNLOCK *cmd, lcbtrace_SPAN *span);
1243 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_collection(lcb_CMDUNLOCK *cmd, const char *scope, size_t scope_len,
1244  const char *collection, size_t collection_len);
1245 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_key(lcb_CMDUNLOCK *cmd, const char *key, size_t key_len);
1246 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_cas(lcb_CMDUNLOCK *cmd, uint64_t cas);
1247 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_timeout(lcb_CMDUNLOCK *cmd, uint32_t timeout);
1248 LIBCOUCHBASE_API lcb_STATUS lcb_unlock(lcb_INSTANCE *instance, void *cookie, const lcb_CMDUNLOCK *cmd);
1249 
1252 /* @ingroup lcb-kv-api
1253  * @defgroup lcb-touch Touch/Expiry
1254  * @brief Modify or clear a document's expiration time
1255  * @details Couchbase allows documents to contain expiration times
1256  * (see lcb_CMDBASE::exptime). Most operations allow the expiry time to be
1257  * updated, however lcb_touch3() allows the exclusive update of the expiration
1258  * time without additional network overhead.
1259  *
1260  * @addtogroup lcb-touch
1261  * @{
1262  */
1263 
1294 typedef struct lcb_RESPTOUCH_ lcb_RESPTOUCH;
1295 
1296 LIBCOUCHBASE_API lcb_STATUS lcb_resptouch_status(const lcb_RESPTOUCH *resp);
1297 LIBCOUCHBASE_API lcb_STATUS lcb_resptouch_error_context(const lcb_RESPTOUCH *resp,
1298  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
1299 LIBCOUCHBASE_API lcb_STATUS lcb_resptouch_cookie(const lcb_RESPTOUCH *resp, void **cookie);
1300 LIBCOUCHBASE_API lcb_STATUS lcb_resptouch_cas(const lcb_RESPTOUCH *resp, uint64_t *cas);
1301 LIBCOUCHBASE_API lcb_STATUS lcb_resptouch_key(const lcb_RESPTOUCH *resp, const char **key, size_t *key_len);
1302 LIBCOUCHBASE_API lcb_STATUS lcb_resptouch_mutation_token(const lcb_RESPTOUCH *resp, lcb_MUTATION_TOKEN *token);
1303 
1304 typedef struct lcb_CMDTOUCH_ lcb_CMDTOUCH;
1305 
1306 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_create(lcb_CMDTOUCH **cmd);
1307 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_destroy(lcb_CMDTOUCH *cmd);
1308 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_parent_span(lcb_CMDTOUCH *cmd, lcbtrace_SPAN *span);
1309 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_collection(lcb_CMDTOUCH *cmd, const char *scope, size_t scope_len,
1310  const char *collection, size_t collection_len);
1311 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_key(lcb_CMDTOUCH *cmd, const char *key, size_t key_len);
1312 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_expiry(lcb_CMDTOUCH *cmd, uint32_t expiration);
1313 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_durability(lcb_CMDTOUCH *cmd, lcb_DURABILITY_LEVEL level);
1314 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_timeout(lcb_CMDTOUCH *cmd, uint32_t timeout);
1315 LIBCOUCHBASE_API lcb_STATUS lcb_touch(lcb_INSTANCE *instance, void *cookie, const lcb_CMDTOUCH *cmd);
1316 
1334 typedef enum {
1335  LCB_PING_STATUS_OK = 0,
1336  LCB_PING_STATUS_TIMEOUT,
1337  LCB_PING_STATUS_ERROR,
1338  LCB_PING_STATUS_INVALID, /* bad index or argument */
1339  LCB_PING_STATUS__MAX
1340 } lcb_PING_STATUS;
1341 
1347 typedef enum {
1348  LCB_PING_SERVICE_KV = 0,
1349  LCB_PING_SERVICE_VIEWS,
1350  LCB_PING_SERVICE_QUERY,
1351  LCB_PING_SERVICE_SEARCH,
1352  LCB_PING_SERVICE_ANALYTICS,
1353  LCB_PING_SERVICE__MAX
1355 
1356 typedef struct lcb_RESPPING_ lcb_RESPPING;
1357 
1358 LIBCOUCHBASE_API lcb_STATUS lcb_respping_status(const lcb_RESPPING *resp);
1359 LIBCOUCHBASE_API lcb_STATUS lcb_respping_cookie(const lcb_RESPPING *resp, void **cookie);
1360 LIBCOUCHBASE_API lcb_STATUS lcb_respping_value(const lcb_RESPPING *resp, const char **json, size_t *json_len);
1361 LIBCOUCHBASE_API size_t lcb_respping_result_size(const lcb_RESPPING *resp);
1362 LIBCOUCHBASE_API lcb_PING_STATUS lcb_respping_result_status(const lcb_RESPPING *resp, size_t index);
1363 LIBCOUCHBASE_API lcb_STATUS lcb_respping_result_id(const lcb_RESPPING *resp, size_t index, const char **endpoint_id,
1364  size_t *endpoint_id_len);
1365 LIBCOUCHBASE_API lcb_STATUS lcb_respping_result_service(const lcb_RESPPING *resp, size_t index, lcb_PING_SERVICE *type);
1366 LIBCOUCHBASE_API lcb_STATUS lcb_respping_result_remote(const lcb_RESPPING *resp, size_t index, const char **address,
1367  size_t *address_len);
1368 LIBCOUCHBASE_API lcb_STATUS lcb_respping_result_local(const lcb_RESPPING *resp, size_t index, const char **address,
1369  size_t *address_len);
1370 LIBCOUCHBASE_API lcb_STATUS lcb_respping_result_latency(const lcb_RESPPING *resp, size_t index, uint64_t *latency);
1371 LIBCOUCHBASE_API lcb_STATUS lcb_respping_result_scope(const lcb_RESPPING *resp, size_t index, const char **name,
1372  size_t *name_len);
1373 
1374 typedef struct lcb_CMDPING_ lcb_CMDPING;
1375 
1376 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_create(lcb_CMDPING **cmd);
1377 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_destroy(lcb_CMDPING *cmd);
1378 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_parent_span(lcb_CMDPING *cmd, lcbtrace_SPAN *span);
1379 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_report_id(lcb_CMDPING *cmd, const char *report_id, size_t report_id_len);
1380 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_all(lcb_CMDPING *cmd);
1381 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_kv(lcb_CMDPING *cmd, int enable);
1382 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_query(lcb_CMDPING *cmd, int enable);
1383 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_views(lcb_CMDPING *cmd, int enable);
1384 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_search(lcb_CMDPING *cmd, int enable);
1385 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_analytics(lcb_CMDPING *cmd, int enable);
1386 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_no_metrics(lcb_CMDPING *cmd, int enable);
1387 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_encode_json(lcb_CMDPING *cmd, int enable, int pretty, int with_details);
1388 LIBCOUCHBASE_API lcb_STATUS lcb_ping(lcb_INSTANCE *instance, void *cookie, const lcb_CMDPING *cmd);
1389 
1390 typedef struct lcb_RESPDIAG_ lcb_RESPDIAG;
1391 
1392 LIBCOUCHBASE_API lcb_STATUS lcb_respdiag_status(const lcb_RESPDIAG *resp);
1393 LIBCOUCHBASE_API lcb_STATUS lcb_respdiag_cookie(const lcb_RESPDIAG *resp, void **cookie);
1394 LIBCOUCHBASE_API lcb_STATUS lcb_respdiag_value(const lcb_RESPDIAG *resp, const char **json, size_t *json_len);
1395 
1396 typedef struct lcb_CMDDIAG_ lcb_CMDDIAG;
1397 
1398 LIBCOUCHBASE_API lcb_STATUS lcb_cmddiag_create(lcb_CMDDIAG **cmd);
1399 LIBCOUCHBASE_API lcb_STATUS lcb_cmddiag_destroy(lcb_CMDDIAG *cmd);
1400 LIBCOUCHBASE_API lcb_STATUS lcb_cmddiag_report_id(lcb_CMDDIAG *cmd, const char *report_id, size_t report_id_len);
1401 LIBCOUCHBASE_API lcb_STATUS lcb_cmddiag_prettify(lcb_CMDDIAG *cmd, int enable);
1439 LIBCOUCHBASE_API lcb_STATUS lcb_diag(lcb_INSTANCE *instance, void *cookie, const lcb_CMDDIAG *cmd);
1440 
1443 /* @ingroup lcb-public-api
1444  * @defgroup lcb-http HTTP Client
1445  * @brief Access Couchbase HTTP APIs
1446  * @details The low-level HTTP client may be used to access various HTTP-based
1447  * Couchbase APIs.
1448  *
1449  * Note that existing higher level APIs can be used for N1QL queries (see
1450  * @ref lcb-n1ql-api) and MapReduce view queries (see @ref lcb-view-api)
1451  *
1452  * @addtogroup lcb-http
1453  * @{
1454  */
1455 
1459 typedef enum {
1465 
1473 
1478 
1481 
1484 
1487 
1494 
1495  LCB_HTTP_TYPE_MAX
1496 } lcb_HTTP_TYPE;
1497 
1504 typedef enum {
1505  LCB_HTTP_METHOD_GET = 0,
1506  LCB_HTTP_METHOD_POST = 1,
1507  LCB_HTTP_METHOD_PUT = 2,
1508  LCB_HTTP_METHOD_DELETE = 3,
1509  LCB_HTTP_METHOD_MAX = 4
1510 } lcb_HTTP_METHOD;
1511 
1581 typedef struct lcb_RESPHTTP_ lcb_RESPHTTP;
1582 
1583 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_status(const lcb_RESPHTTP *resp);
1584 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_cookie(const lcb_RESPHTTP *resp, void **cookie);
1585 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_http_status(const lcb_RESPHTTP *resp, uint16_t *status);
1586 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_path(const lcb_RESPHTTP *resp, const char **path, size_t *path_len);
1587 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_body(const lcb_RESPHTTP *resp, const char **body, size_t *body_len);
1588 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_handle(const lcb_RESPHTTP *resp, lcb_HTTP_HANDLE **handle);
1589 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_error_context(const lcb_RESPHTTP *resp, const lcb_HTTP_ERROR_CONTEXT **ctx);
1590 
1591 LIBCOUCHBASE_API int lcb_resphttp_is_final(const lcb_RESPHTTP *resp);
1596 LIBCOUCHBASE_API lcb_STATUS lcb_resphttp_headers(const lcb_RESPHTTP *resp, const char *const **headers);
1597 
1598 typedef struct lcb_CMDHTTP_ lcb_CMDHTTP;
1599 
1600 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_create(lcb_CMDHTTP **cmd, lcb_HTTP_TYPE type);
1601 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_destroy(lcb_CMDHTTP *cmd);
1602 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_parent_span(lcb_CMDHTTP *cmd, lcbtrace_SPAN *span);
1603 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_method(lcb_CMDHTTP *cmd, lcb_HTTP_METHOD method);
1604 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_path(lcb_CMDHTTP *cmd, const char *path, size_t path_len);
1605 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_content_type(lcb_CMDHTTP *cmd, const char *content_type,
1606  size_t content_type_len);
1607 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_body(lcb_CMDHTTP *cmd, const char *body, size_t body_len);
1608 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_handle(lcb_CMDHTTP *cmd, lcb_HTTP_HANDLE **handle);
1609 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_username(lcb_CMDHTTP *cmd, const char *username, size_t username_len);
1610 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_password(lcb_CMDHTTP *cmd, const char *password, size_t password_len);
1611 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_host(lcb_CMDHTTP *cmd, const char *host, size_t host_len);
1612 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_streaming(lcb_CMDHTTP *cmd, int streaming);
1613 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_skip_auth_header(lcb_CMDHTTP *cmd, int skip_auth);
1614 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_timeout(lcb_CMDHTTP *cmd, uint32_t timeout);
1615 LIBCOUCHBASE_API lcb_STATUS lcb_http(lcb_INSTANCE *instance, void *cookie, const lcb_CMDHTTP *cmd);
1616 
1642 LIBCOUCHBASE_API lcb_STATUS lcb_http_cancel(lcb_INSTANCE *instance, lcb_HTTP_HANDLE *handle);
1643 
1709 LIBCOUCHBASE_API
1710 void lcb_set_cookie(lcb_INSTANCE *instance, const void *cookie);
1711 
1719 LIBCOUCHBASE_API
1720 const void *lcb_get_cookie(lcb_INSTANCE *instance);
1762 LIBCOUCHBASE_API
1764 
1766 typedef enum {
1769 
1777  LCB_WAIT_NOCHECK = 0x01
1779 
1787 LIBCOUCHBASE_API
1789 
1801 LIBCOUCHBASE_API
1802 void lcb_breakout(lcb_INSTANCE *instance);
1803 
1810 LIBCOUCHBASE_API
1888 LIBCOUCHBASE_API
1890 
1909 LIBCOUCHBASE_API
1911 
1935 LIBCOUCHBASE_API
1937 
1955 LIBCOUCHBASE_API
1957 
1960 /* @ingroup lcb-public-api
1961  * @defgroup lcb-destroy Destroying
1962  * @brief Library destruction routines
1963  * @addtogroup lcb-destroy
1964  * @{
1965  */
1976 LIBCOUCHBASE_API
1977 void lcb_destroy(lcb_INSTANCE *instance);
1978 
1983 typedef void (*lcb_destroy_callback)(const void *cookie);
1984 
1990 LIBCOUCHBASE_API
2018 LIBCOUCHBASE_API
2019 void lcb_destroy_async(lcb_INSTANCE *instance, const void *arg);
2023 #define LCB_DATATYPE_JSON 0x01
2026 typedef enum { LCB_VALUE_RAW = 0x00, LCB_VALUE_F_JSON = 0x01, LCB_VALUE_F_SNAPPYCOMP = 0x02 } lcb_VALUEFLAGS;
2027 
2087 LIBCOUCHBASE_API
2088 lcb_STATUS lcb_cntl(lcb_INSTANCE *instance, int mode, int cmd, void *arg);
2089 
2153 LIBCOUCHBASE_API
2154 lcb_STATUS lcb_cntl_string(lcb_INSTANCE *instance, const char *key, const char *value);
2155 
2164 LIBCOUCHBASE_API
2165 lcb_STATUS lcb_cntl_setu32(lcb_INSTANCE *instance, int cmd, lcb_U32 arg);
2166 
2176 LIBCOUCHBASE_API
2177 lcb_U32 lcb_cntl_getu32(lcb_INSTANCE *instance, int cmd);
2178 
2184 LIBCOUCHBASE_API
2185 int lcb_cntl_exists(int ctl);
2186 
2244 LIBCOUCHBASE_API
2246 
2262 #if !defined(LCB_VERSION_STRING) || defined(__LCB_DOXYGEN__)
2263 
2264 #define LCB_VERSION_STRING "unknown"
2265 #endif
2266 
2267 #if !defined(LCB_VERSION) || defined(__LCB_DOXYGEN__)
2268 
2283 #define LCB_VERSION 0x000000
2284 #endif
2285 
2286 #if !defined(LCB_VERSION_CHANGESET) || defined(__LCB_DOXYGEN__)
2287 
2288 #define LCB_VERSION_CHANGESET "0xdeadbeef"
2289 #endif
2290 
2301 LIBCOUCHBASE_API
2302 const char *lcb_get_version(lcb_U32 *version);
2303 
2305 LIBCOUCHBASE_API LCB_EXTERN_VAR const lcb_U32 lcb_version_g;
2306 
2308 #define LCB_SUPPORTS_SSL 1
2310 #define LCB_SUPPORTS_SNAPPY 2
2312 #define LCB_SUPPORTS_TRACING 3
2320 LIBCOUCHBASE_API
2322 
2337 LIBCOUCHBASE_API
2339 
2340 
2351 typedef struct lcb_ANALYTICS_HANDLE_ lcb_ANALYTICS_HANDLE;
2352 typedef struct lcb_DEFERRED_HANDLE_ lcb_DEFERRED_HANDLE;
2353 
2359 typedef struct lcb_RESPANALYTICS_ lcb_RESPANALYTICS;
2360 
2367 typedef void (*lcb_ANALYTICS_CALLBACK)(lcb_INSTANCE *, int, const lcb_RESPANALYTICS *);
2368 
2369 LIBCOUCHBASE_API lcb_STATUS lcb_respanalytics_status(const lcb_RESPANALYTICS *resp);
2370 LIBCOUCHBASE_API lcb_STATUS lcb_respanalytics_cookie(const lcb_RESPANALYTICS *resp, void **cookie);
2371 LIBCOUCHBASE_API lcb_STATUS lcb_respanalytics_row(const lcb_RESPANALYTICS *resp, const char **row, size_t *row_len);
2372 LIBCOUCHBASE_API lcb_STATUS lcb_respanalytics_http_response(const lcb_RESPANALYTICS *resp, const lcb_RESPHTTP **http);
2380 LIBCOUCHBASE_API lcb_STATUS lcb_respanalytics_handle(const lcb_RESPANALYTICS *resp, lcb_ANALYTICS_HANDLE **handle);
2381 LIBCOUCHBASE_API lcb_STATUS lcb_respanalytics_error_context(const lcb_RESPANALYTICS *resp,
2382  const lcb_ANALYTICS_ERROR_CONTEXT **ctx);
2383 LIBCOUCHBASE_API int lcb_respanalytics_is_final(const lcb_RESPANALYTICS *resp);
2384 LIBCOUCHBASE_API lcb_STATUS lcb_respanalytics_deferred_handle_extract(const lcb_RESPANALYTICS *resp,
2385  lcb_DEFERRED_HANDLE **handle);
2386 LIBCOUCHBASE_API lcb_STATUS lcb_deferred_handle_destroy(lcb_DEFERRED_HANDLE *handle);
2387 LIBCOUCHBASE_API lcb_STATUS lcb_deferred_handle_status(lcb_DEFERRED_HANDLE *handle, const char **status,
2388  size_t *status_len);
2389 LIBCOUCHBASE_API lcb_STATUS lcb_deferred_handle_callback(lcb_DEFERRED_HANDLE *handle, lcb_ANALYTICS_CALLBACK callback);
2390 LIBCOUCHBASE_API lcb_STATUS lcb_deferred_handle_poll(lcb_INSTANCE *instance, void *cookie, lcb_DEFERRED_HANDLE *handle);
2391 
2392 typedef struct lcb_CMDANALYTICS_ lcb_CMDANALYTICS;
2393 
2394 typedef struct lcb_INGEST_OPTIONS_ lcb_INGEST_OPTIONS;
2395 typedef enum {
2396  LCB_INGEST_METHOD_NONE = 0,
2397  LCB_INGEST_METHOD_UPSERT,
2398  LCB_INGEST_METHOD_INSERT,
2399  LCB_INGEST_METHOD_REPLACE,
2400  LCB_INGEST_METHOD__MAX
2401 } lcb_INGEST_METHOD;
2402 
2403 typedef enum {
2404 
2416 
2417 typedef enum { LCB_INGEST_STATUS_OK = 0, LCB_INGEST_STATUS_IGNORE, LCB_INGEST_STATUS__MAX } lcb_INGEST_STATUS;
2418 
2419 typedef struct lcb_INGEST_PARAM_ lcb_INGEST_PARAM;
2420 
2421 typedef lcb_INGEST_STATUS (*lcb_INGEST_DATACONVERTER_CALLBACK)(lcb_INSTANCE *instance, lcb_INGEST_PARAM *param);
2422 
2423 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_options_create(lcb_INGEST_OPTIONS **options);
2424 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_options_destroy(lcb_INGEST_OPTIONS *options);
2425 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_options_method(lcb_INGEST_OPTIONS *options, lcb_INGEST_METHOD method);
2426 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_options_expiry(lcb_INGEST_OPTIONS *options, uint32_t expiration);
2427 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_options_ignore_error(lcb_INGEST_OPTIONS *options, int flag);
2428 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_options_data_converter(lcb_INGEST_OPTIONS *options,
2429  lcb_INGEST_DATACONVERTER_CALLBACK callback);
2430 
2431 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_dataconverter_param_cookie(lcb_INGEST_PARAM *param, void **cookie);
2432 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_dataconverter_param_row(lcb_INGEST_PARAM *param, const char **row,
2433  size_t *row_len);
2434 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_dataconverter_param_method(lcb_INGEST_PARAM *param, lcb_INGEST_METHOD *method);
2435 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_dataconverter_param_set_id(lcb_INGEST_PARAM *param, const char *id,
2436  size_t id_len, void (*id_dtor)(const char *));
2437 LIBCOUCHBASE_API lcb_STATUS lcb_ingest_dataconverter_param_set_out(lcb_INGEST_PARAM *param, const char *out,
2438  size_t out_len, void (*out_dtor)(const char *));
2439 
2440 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_create(lcb_CMDANALYTICS **cmd);
2441 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_destroy(lcb_CMDANALYTICS *cmd);
2442 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_reset(lcb_CMDANALYTICS *cmd);
2466 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_parent_span(lcb_CMDANALYTICS *cmd, lcbtrace_SPAN *span);
2473 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_callback(lcb_CMDANALYTICS *cmd, lcb_ANALYTICS_CALLBACK callback);
2474 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_encoded_payload(lcb_CMDANALYTICS *cmd, const char **query,
2475  size_t *query_len);
2476 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_payload(lcb_CMDANALYTICS *cmd, const char *query, size_t query_len);
2477 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_statement(lcb_CMDANALYTICS *cmd, const char *statement,
2478  size_t statement_len);
2479 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_named_param(lcb_CMDANALYTICS *cmd, const char *name, size_t name_len,
2480  const char *value, size_t value_len);
2481 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_positional_param(lcb_CMDANALYTICS *cmd, const char *value,
2482  size_t value_len);
2483 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_ingest_options(lcb_CMDANALYTICS *cmd, lcb_INGEST_OPTIONS *options);
2484 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_deferred(lcb_CMDANALYTICS *cmd, int deferred);
2485 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_client_context_id(lcb_CMDANALYTICS *cmd, const char *value,
2486  size_t value_len);
2487 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_readonly(lcb_CMDANALYTICS *cmd, int readonly);
2488 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_priority(lcb_CMDANALYTICS *cmd, int priority);
2489 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_consistency(lcb_CMDANALYTICS *cmd, lcb_ANALYTICS_CONSISTENCY level);
2490 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_option(lcb_CMDANALYTICS *cmd, const char *name, size_t name_len,
2491  const char *value, size_t value_len);
2499 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_handle(lcb_CMDANALYTICS *cmd, lcb_ANALYTICS_HANDLE **handle);
2500 LIBCOUCHBASE_API lcb_STATUS lcb_cmdanalytics_timeout(lcb_CMDANALYTICS *cmd, uint32_t timeout);
2513 LIBCOUCHBASE_API lcb_STATUS lcb_analytics(lcb_INSTANCE *instance, void *cookie, const lcb_CMDANALYTICS *cmd);
2547 LIBCOUCHBASE_API lcb_STATUS lcb_analytics_cancel(lcb_INSTANCE *instance, lcb_ANALYTICS_HANDLE *handle);
2548 
2561 typedef struct lcb_SEARCH_HANDLE_ lcb_SEARCH_HANDLE;
2562 typedef struct lcb_RESPSEARCH_ lcb_RESPSEARCH;
2563 
2564 LIBCOUCHBASE_API lcb_STATUS lcb_respsearch_status(const lcb_RESPSEARCH *resp);
2565 LIBCOUCHBASE_API lcb_STATUS lcb_respsearch_cookie(const lcb_RESPSEARCH *resp, void **cookie);
2566 LIBCOUCHBASE_API lcb_STATUS lcb_respsearch_row(const lcb_RESPSEARCH *resp, const char **row, size_t *row_len);
2567 LIBCOUCHBASE_API lcb_STATUS lcb_respsearch_http_response(const lcb_RESPSEARCH *resp, const lcb_RESPHTTP **http);
2575 LIBCOUCHBASE_API lcb_STATUS lcb_respsearch_handle(const lcb_RESPSEARCH *resp, lcb_SEARCH_HANDLE **handle);
2576 LIBCOUCHBASE_API lcb_STATUS lcb_respsearch_error_context(const lcb_RESPSEARCH *resp,
2577  const lcb_SEARCH_ERROR_CONTEXT **ctx);
2578 LIBCOUCHBASE_API int lcb_respsearch_is_final(const lcb_RESPSEARCH *resp);
2579 
2580 typedef struct lcb_CMDSEARCH_ lcb_CMDSEARCH;
2581 typedef void (*lcb_SEARCH_CALLBACK)(lcb_INSTANCE *, int, const lcb_RESPSEARCH *);
2582 
2583 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_create(lcb_CMDSEARCH **cmd);
2584 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_destroy(lcb_CMDSEARCH *cmd);
2611 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_parent_span(lcb_CMDSEARCH *cmd, lcbtrace_SPAN *span);
2618 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_callback(lcb_CMDSEARCH *cmd, lcb_SEARCH_CALLBACK callback);
2619 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_payload(lcb_CMDSEARCH *cmd, const char *payload, size_t payload_len);
2626 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_handle(lcb_CMDSEARCH *cmd, lcb_SEARCH_HANDLE **handle);
2627 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_timeout(lcb_CMDSEARCH *cmd, uint32_t timeout);
2628 
2640 LIBCOUCHBASE_API lcb_STATUS lcb_search(lcb_INSTANCE *instance, void *cookie, const lcb_CMDSEARCH *cmd);
2648 LIBCOUCHBASE_API lcb_STATUS lcb_search_cancel(lcb_INSTANCE *instance, lcb_SEARCH_HANDLE *handle);
2707 typedef struct lcb_RESPQUERY_ lcb_RESPQUERY;
2708 
2712 typedef struct lcb_CMDQUERY_ lcb_CMDQUERY;
2716 typedef struct lcb_QUERY_HANDLE_ lcb_QUERY_HANDLE;
2717 
2724 typedef void (*lcb_QUERY_CALLBACK)(lcb_INSTANCE *, int, const lcb_RESPQUERY *);
2725 
2726 typedef enum {
2729 
2736 
2739 
2743 
2744 typedef enum {
2745  LCB_QUERY_PROFILE_OFF = 0,
2746  LCB_QUERY_PROFILE_PHASES = 1,
2747  LCB_QUERY_PROFILE_TIMINGS = 2
2748 } lcb_QUERY_PROFILE;
2749 
2750 LIBCOUCHBASE_API lcb_STATUS lcb_respquery_status(const lcb_RESPQUERY *resp);
2751 LIBCOUCHBASE_API lcb_STATUS lcb_respquery_cookie(const lcb_RESPQUERY *resp, void **cookie);
2752 LIBCOUCHBASE_API lcb_STATUS lcb_respquery_row(const lcb_RESPQUERY *resp, const char **row, size_t *row_len);
2753 LIBCOUCHBASE_API lcb_STATUS lcb_respquery_http_response(const lcb_RESPQUERY *resp, const lcb_RESPHTTP **http);
2754 LIBCOUCHBASE_API lcb_STATUS lcb_respquery_handle(const lcb_RESPQUERY *resp, lcb_QUERY_HANDLE **handle);
2755 LIBCOUCHBASE_API lcb_STATUS lcb_respquery_error_context(const lcb_RESPQUERY *resp, const lcb_QUERY_ERROR_CONTEXT **ctx);
2756 LIBCOUCHBASE_API int lcb_respquery_is_final(const lcb_RESPQUERY *resp);
2789 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_encoded_payload(lcb_CMDQUERY *cmd, const char **payload, size_t *payload_len);
2816 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_parent_span(lcb_CMDQUERY *cmd, lcbtrace_SPAN *span);
2824 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_callback(lcb_CMDQUERY *cmd, lcb_QUERY_CALLBACK callback);
2831 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_payload(lcb_CMDQUERY *cmd, const char *query, size_t query_len);
2838 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_statement(lcb_CMDQUERY *cmd, const char *statement, size_t statement_len);
2845 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_scope_name(lcb_CMDQUERY *cmd, const char *scope, size_t scope_len);
2857 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_scope_qualifier(lcb_CMDQUERY *cmd, const char *qualifier, size_t qualifier_len);
2866 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_named_param(lcb_CMDQUERY *cmd, const char *name, size_t name_len,
2867  const char *value, size_t value_len);
2876 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_positional_param(lcb_CMDQUERY *cmd, const char *value, size_t value_len);
2877 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_adhoc(lcb_CMDQUERY *cmd, int adhoc);
2878 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_client_context_id(lcb_CMDQUERY *cmd, const char *value, size_t value_len);
2879 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_pretty(lcb_CMDQUERY *cmd, int pretty);
2899 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_readonly(lcb_CMDQUERY *cmd, int readonly);
2900 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_metrics(lcb_CMDQUERY *cmd, int metrics);
2911 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_scan_cap(lcb_CMDQUERY *cmd, int value);
2912 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_scan_wait(lcb_CMDQUERY *cmd, uint32_t us);
2913 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_profile(lcb_CMDQUERY *cmd, lcb_QUERY_PROFILE mode);
2921 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_pipeline_cap(lcb_CMDQUERY *cmd, int value);
2929 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_pipeline_batch(lcb_CMDQUERY *cmd, int value);
2930 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_max_parallelism(lcb_CMDQUERY *cmd, int value);
2949 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_consistency_token_for_keyspace(lcb_CMDQUERY *cmd, const char *keyspace,
2950  size_t keyspace_len,
2951  const lcb_MUTATION_TOKEN *token);
2952 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_consistency_tokens(lcb_CMDQUERY *cmd, lcb_INSTANCE *instance);
2961 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_option(lcb_CMDQUERY *cmd, const char *name, size_t name_len, const char *value,
2962  size_t value_len);
2963 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_handle(lcb_CMDQUERY *cmd, lcb_QUERY_HANDLE **handle);
2964 LIBCOUCHBASE_API lcb_STATUS lcb_cmdquery_timeout(lcb_CMDQUERY *cmd, uint32_t timeout);
2976 LIBCOUCHBASE_API lcb_STATUS lcb_query(lcb_INSTANCE *instance, void *cookie, const lcb_CMDQUERY *cmd);
3005 LIBCOUCHBASE_API lcb_STATUS lcb_query_cancel(lcb_INSTANCE *instance, lcb_QUERY_HANDLE *handle);
3019 typedef struct lcb_RESPVIEW_ lcb_RESPVIEW;
3020 typedef struct lcb_CMDVIEW_ lcb_CMDVIEW;
3021 
3025 typedef struct lcb_VIEW_HANDLE_ lcb_VIEW_HANDLE;
3026 
3038 typedef void (*lcb_VIEW_CALLBACK)(lcb_INSTANCE *instance, int cbtype, const lcb_RESPVIEW *row);
3039 
3040 LIBCOUCHBASE_API lcb_STATUS lcb_respview_status(const lcb_RESPVIEW *resp);
3041 LIBCOUCHBASE_API lcb_STATUS lcb_respview_cookie(const lcb_RESPVIEW *resp, void **cookie);
3042 LIBCOUCHBASE_API lcb_STATUS lcb_respview_key(const lcb_RESPVIEW *resp, const char **key, size_t *key_len);
3043 LIBCOUCHBASE_API lcb_STATUS lcb_respview_doc_id(const lcb_RESPVIEW *resp, const char **doc_id, size_t *doc_id_len);
3044 LIBCOUCHBASE_API lcb_STATUS lcb_respview_row(const lcb_RESPVIEW *resp, const char **row, size_t *row_len);
3045 LIBCOUCHBASE_API lcb_STATUS lcb_respview_document(const lcb_RESPVIEW *resp, const lcb_RESPGET **doc);
3046 LIBCOUCHBASE_API lcb_STATUS lcb_respview_http_response(const lcb_RESPVIEW *resp, const lcb_RESPHTTP **http);
3047 LIBCOUCHBASE_API lcb_STATUS lcb_respview_handle(const lcb_RESPVIEW *resp, lcb_VIEW_HANDLE **handle);
3048 LIBCOUCHBASE_API lcb_STATUS lcb_respview_error_context(const lcb_RESPVIEW *resp, const lcb_VIEW_ERROR_CONTEXT **ctx);
3049 LIBCOUCHBASE_API int lcb_respview_is_final(const lcb_RESPVIEW *resp);
3050 
3051 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_create(lcb_CMDVIEW **cmd);
3052 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_destroy(lcb_CMDVIEW *cmd);
3053 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_parent_span(lcb_CMDVIEW *cmd, lcbtrace_SPAN *span);
3054 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_callback(lcb_CMDVIEW *cmd, lcb_VIEW_CALLBACK callback);
3055 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_design_document(lcb_CMDVIEW *cmd, const char *ddoc, size_t ddoc_len);
3056 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_view_name(lcb_CMDVIEW *cmd, const char *view, size_t view_len);
3057 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_option_string(lcb_CMDVIEW *cmd, const char *optstr, size_t optstr_len);
3058 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_post_data(lcb_CMDVIEW *cmd, const char *data, size_t data_len);
3059 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_include_docs(lcb_CMDVIEW *cmd, int include_docs);
3060 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_max_concurrent_docs(lcb_CMDVIEW *cmd, uint32_t num);
3061 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_no_row_parse(lcb_CMDVIEW *cmd, int flag);
3062 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_handle(lcb_CMDVIEW *cmd, lcb_VIEW_HANDLE **handle);
3063 LIBCOUCHBASE_API lcb_STATUS lcb_cmdview_timeout(lcb_CMDVIEW *cmd, uint32_t timeout);
3064 LIBCOUCHBASE_API lcb_STATUS lcb_view(lcb_INSTANCE *instance, void *cookie, const lcb_CMDVIEW *cmd);
3065 LIBCOUCHBASE_API lcb_STATUS lcb_view_cancel(lcb_INSTANCE *instance, lcb_VIEW_HANDLE *handle);
3068 /* @ingroup lcb-public-api
3069  * @defgroup lcb-subdoc Sub-Document API
3070  * @brief Experimental in-document API access
3071  * @details The sub-document API uses features from the upcoming Couchbase
3072  * 4.5 release which allows access to parts of the document. These parts are
3073  * called _sub-documents_ and can be accessed using the sub-document API
3074  *
3075  * @addtogroup lcb-subdoc
3076  * @{
3077  */
3078 
3079 typedef struct lcb_RESPSUBDOC_ lcb_RESPSUBDOC;
3080 
3081 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_status(const lcb_RESPSUBDOC *resp);
3082 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_error_context(const lcb_RESPSUBDOC *resp,
3083  const lcb_KEY_VALUE_ERROR_CONTEXT **ctx);
3084 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_cookie(const lcb_RESPSUBDOC *resp, void **cookie);
3085 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_cas(const lcb_RESPSUBDOC *resp, uint64_t *cas);
3086 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_key(const lcb_RESPSUBDOC *resp, const char **key, size_t *key_len);
3087 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_mutation_token(const lcb_RESPSUBDOC *resp, lcb_MUTATION_TOKEN *token);
3088 
3089 LIBCOUCHBASE_API size_t lcb_respsubdoc_result_size(const lcb_RESPSUBDOC *resp);
3090 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_result_status(const lcb_RESPSUBDOC *resp, size_t index);
3091 LIBCOUCHBASE_API lcb_STATUS lcb_respsubdoc_result_value(const lcb_RESPSUBDOC *resp, size_t index, const char **value,
3092  size_t *value_len);
3093 
3094 typedef struct lcb_SUBDOCSPECS_ lcb_SUBDOCSPECS;
3095 
3097 #define LCB_SUBDOCSPECS_F_MKINTERMEDIATES (1u << 16u)
3100 #define LCB_SUBDOCSPECS_F_XATTRPATH (1u << 18u)
3103 #define LCB_SUBDOCSPECS_F_XATTR_MACROVALUES (1u << 19u)
3106 #define LCB_SUBDOCSPECS_F_XATTR_DELETED_OK (1u << 20u)
3108 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_create(lcb_SUBDOCSPECS **operations, size_t capacity);
3109 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_destroy(lcb_SUBDOCSPECS *operations);
3110 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_get(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3111  const char *path, size_t path_len);
3112 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_exists(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3113  const char *path, size_t path_len);
3114 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_replace(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3115  const char *path, size_t path_len, const char *value,
3116  size_t value_len);
3117 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_dict_add(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3118  const char *path, size_t path_len, const char *value,
3119  size_t value_len);
3120 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_dict_upsert(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3121  const char *path, size_t path_len, const char *value,
3122  size_t value_len);
3123 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_array_add_first(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3124  const char *path, size_t path_len, const char *value,
3125  size_t value_len);
3126 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_array_add_last(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3127  const char *path, size_t path_len, const char *value,
3128  size_t value_len);
3129 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_array_add_unique(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3130  const char *path, size_t path_len, const char *value,
3131  size_t value_len);
3132 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_array_insert(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3133  const char *path, size_t path_len, const char *value,
3134  size_t value_len);
3135 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_counter(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3136  const char *path, size_t path_len, int64_t delta);
3137 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_remove(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3138  const char *path, size_t path_len);
3139 LIBCOUCHBASE_API lcb_STATUS lcb_subdocspecs_get_count(lcb_SUBDOCSPECS *operations, size_t index, uint32_t flags,
3140  const char *path, size_t path_len);
3141 
3142 typedef struct lcb_CMDSUBDOC_ lcb_CMDSUBDOC;
3143 
3144 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_create(lcb_CMDSUBDOC **cmd);
3145 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_destroy(lcb_CMDSUBDOC *cmd);
3146 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_parent_span(lcb_CMDSUBDOC *cmd, lcbtrace_SPAN *span);
3147 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_collection(lcb_CMDSUBDOC *cmd, const char *scope, size_t scope_len,
3148  const char *collection, size_t collection_len);
3149 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_key(lcb_CMDSUBDOC *cmd, const char *key, size_t key_len);
3150 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_cas(lcb_CMDSUBDOC *cmd, uint64_t cas);
3151 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_specs(lcb_CMDSUBDOC *cmd, const lcb_SUBDOCSPECS *operations);
3152 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_expiry(lcb_CMDSUBDOC *cmd, uint32_t expiration);
3153 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_durability(lcb_CMDSUBDOC *cmd, lcb_DURABILITY_LEVEL level);
3154 typedef enum {
3155  LCB_SUBDOC_STORE_REPLACE = 0,
3156  LCB_SUBDOC_STORE_UPSERT,
3157  LCB_SUBDOC_STORE_INSERT
3158 } lcb_SUBDOC_STORE_SEMANTICS;
3159 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_store_semantics(lcb_CMDSUBDOC *cmd, lcb_SUBDOC_STORE_SEMANTICS mode);
3160 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_access_deleted(lcb_CMDSUBDOC *cmd, int flag);
3161 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsubdoc_timeout(lcb_CMDSUBDOC *cmd, uint32_t timeout);
3162 
3163 LIBCOUCHBASE_API lcb_STATUS lcb_subdoc(lcb_INSTANCE *instance, void *cookie, const lcb_CMDSUBDOC *cmd);
3166 /* Post-include some other headers */
3167 #ifdef __cplusplus
3168 }
3169 #endif /* __cplusplus */
3170 #endif /* LIBCOUCHBASE_COUCHBASE_H */
lcb_cmdquery_create
lcb_STATUS lcb_cmdquery_create(lcb_CMDQUERY **cmd)
Create a new lcb_CMDQUERY object.
LCB_CALLBACK_ENDURE
@ LCB_CALLBACK_ENDURE
lcb_endure3_ctxnew()
Definition: couchbase.h:479
LCB_RESP_F_NMVGEN
@ LCB_RESP_F_NMVGEN
The response was a result of a not-my-vbucket error.
Definition: couchbase.h:439
LCB_ANALYTICS_CONSISTENCY_NOT_BOUNDED
@ LCB_ANALYTICS_CONSISTENCY_NOT_BOUNDED
No consistency constraints.
Definition: couchbase.h:2409
lcb_cmdquery_pipeline_batch
lcb_STATUS lcb_cmdquery_pipeline_batch(lcb_CMDQUERY *cmd, int value)
Sets the number of items execution operators can batch for fetch from the KV.
lcb_VIEW_CALLBACK
void(* lcb_VIEW_CALLBACK)(lcb_INSTANCE *instance, int cbtype, const lcb_RESPVIEW *row)
Callback function invoked for each row returned from the view.
Definition: couchbase.h:3038
LCB_STORE_INSERT
@ LCB_STORE_INSERT
Will cause the operation to fail if the key already exists in the cluster.
Definition: couchbase.h:863
lcb_RESPQUERY
struct lcb_RESPQUERY_ lcb_RESPQUERY
Opaque query response structure.
Definition: couchbase.h:2707
LCB_ANALYTICS_CONSISTENCY_REQUEST_PLUS
@ LCB_ANALYTICS_CONSISTENCY_REQUEST_PLUS
Strong consistency.
Definition: couchbase.h:2414
LCB_DURABILITYLEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE
@ LCB_DURABILITYLEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE
As majority, but additionally persisted to the active node.
Definition: couchbase.h:532
lcb_PING_SERVICE
lcb_PING_SERVICE
Type of the service.
Definition: couchbase.h:1347
lcb_cmdquery_scan_cap
lcb_STATUS lcb_cmdquery_scan_cap(lcb_CMDQUERY *cmd, int value)
Sets maximum buffered channel size between the indexer client and the query service for index scans.
lcb_cntl_setu32
lcb_STATUS lcb_cntl_setu32(lcb_INSTANCE *instance, int cmd, lcb_U32 arg)
Convenience function to set a value as an lcb_U32.
LCB_CALLBACK_OBSERVE
@ LCB_CALLBACK_OBSERVE
lcb_observe3_ctxnew()
Definition: couchbase.h:477
lcb_supports_feature
int lcb_supports_feature(int n)
lcb_cmdquery_scope_name
lcb_STATUS lcb_cmdquery_scope_name(lcb_CMDQUERY *cmd, const char *scope, size_t scope_len)
Associate scope name with the query.
lcb_cmdquery_positional_param
lcb_STATUS lcb_cmdquery_positional_param(lcb_CMDQUERY *cmd, const char *value, size_t value_len)
Adds a positional argument for the query.
LCB_STORE_APPEND
@ LCB_STORE_APPEND
Rather than setting the contents of the entire document, take the value specified in lcb_CMDSTORE::va...
Definition: couchbase.h:876
lcb_ANALYTICS_CALLBACK
void(* lcb_ANALYTICS_CALLBACK)(lcb_INSTANCE *, int, const lcb_RESPANALYTICS *)
Callback to be invoked for each row.
Definition: couchbase.h:2367
lcb_RESPCOUNTER
struct lcb_RESPCOUNTER_ lcb_RESPCOUNTER
Schedule single counter operation.
Definition: couchbase.h:1146
cntl.h
Command codes for libcouchbase.
lcb_diag
lcb_STATUS lcb_diag(lcb_INSTANCE *instance, void *cookie, const lcb_CMDDIAG *cmd)
Returns diagnostics report about network connections.
LCB_WAIT_NOCHECK
@ LCB_WAIT_NOCHECK
Do not check pending operations before running the event loop.
Definition: couchbase.h:1777
lcb_sched_enter
void lcb_sched_enter(lcb_INSTANCE *instance)
Enter a scheduling context.
lcb_RESPHTTP
struct lcb_RESPHTTP_ lcb_RESPHTTP
Definition: couchbase.h:1581
lcb_cmdquery_statement
lcb_STATUS lcb_cmdquery_statement(lcb_CMDQUERY *cmd, const char *statement, size_t statement_len)
Sets the actual statement to be executed.
LCB_QUERY_CONSISTENCY_RYOW
@ LCB_QUERY_CONSISTENCY_RYOW
This is implicitly set by lcb_cmdquery_consistency_token_for_keyspace.
Definition: couchbase.h:2735
LCB_BTYPE_UNSPEC
@ LCB_BTYPE_UNSPEC
Unknown or unspecified.
Definition: couchbase.h:240
lcb_query_cancel
lcb_STATUS lcb_query_cancel(lcb_INSTANCE *instance, lcb_QUERY_HANDLE *handle)
Cancels an in-progress request.
lcb_CALLBACK_TYPE
lcb_CALLBACK_TYPE
The type of response passed to the callback.
Definition: couchbase.h:466
LCB_BTYPE_EPHEMERAL
@ LCB_BTYPE_EPHEMERAL
Data not persisted, but replicated.
Definition: couchbase.h:242
lcb_cmdsearch_handle
lcb_STATUS lcb_cmdsearch_handle(lcb_CMDSEARCH *cmd, lcb_SEARCH_HANDLE **handle)
Obtain handle to search.
lcb_AUTHENTICATOR
LCB_CALLBACK_HTTP
@ LCB_CALLBACK_HTTP
lcb_http()
Definition: couchbase.h:480
lcb_STORE_OPERATION
lcb_STORE_OPERATION
Values for lcb_CMDSTORE::operation.
Definition: couchbase.h:848
lcb_cmdquery_consistency_token_for_keyspace
lcb_STATUS lcb_cmdquery_consistency_token_for_keyspace(lcb_CMDQUERY *cmd, const char *keyspace, size_t keyspace_len, const lcb_MUTATION_TOKEN *token)
Indicate that the query should synchronize its internal snapshot to reflect the changes indicated by ...
lcb_QUERY_CONSISTENCY
lcb_QUERY_CONSISTENCY
Definition: couchbase.h:2726
LCB_RESP_F_CLIENTGEN
@ LCB_RESP_F_CLIENTGEN
The response was artificially generated inside the client.
Definition: couchbase.h:436
LCB_CALLBACK_COLLECTIONS_GET_MANIFEST
@ LCB_CALLBACK_COLLECTIONS_GET_MANIFEST
lcb_getmanifest()
Definition: couchbase.h:489
lcb_IOV
structure indicating a buffer and its size
Definition: iops.h:78
lcb_cmdsearch_parent_span
lcb_STATUS lcb_cmdsearch_parent_span(lcb_CMDSEARCH *cmd, lcbtrace_SPAN *span)
Associate parent tracing span with the FTS request.
lcb_RESPSTORE
struct lcb_RESPSTORE_ lcb_RESPSTORE
Schedule a single storage request.
Definition: couchbase.h:941
lcb_VALUEFLAGS
lcb_VALUEFLAGS
Definition: couchbase.h:2026
lcb_destroy_callback
void(* lcb_destroy_callback)(const void *cookie)
Callback received when instance is about to be destroyed.
Definition: couchbase.h:1983
lcb_version_g
LCB_EXTERN_VAR const lcb_U32 lcb_version_g
Global/extern variable containing the version of the library.
Definition: couchbase.h:2305
lcb_BTYPE
lcb_BTYPE
Type of the bucket.
Definition: couchbase.h:239
lcb_query
lcb_STATUS lcb_query(lcb_INSTANCE *instance, void *cookie, const lcb_CMDQUERY *cmd)
Execute a N1QL query.
LCB_HTTP_TYPE_SEARCH
@ LCB_HTTP_TYPE_SEARCH
Search a fulltext index.
Definition: couchbase.h:1483
lcb_set_bootstrap_callback
lcb_bootstrap_callback lcb_set_bootstrap_callback(lcb_INSTANCE *instance, lcb_bootstrap_callback callback)
Set the callback for notification of success or failure of initial connection.
LCB_CALLBACK_OBSEQNO
@ LCB_CALLBACK_OBSEQNO
For lcb_observe_seqno3()
Definition: couchbase.h:482
lcb_tick_nowait
lcb_STATUS lcb_tick_nowait(lcb_INSTANCE *instance)
lcb_RESPTOUCH
struct lcb_RESPTOUCH_ lcb_RESPTOUCH
Spool a touch request.
Definition: couchbase.h:1294
iops.h
Public I/O integration interface.
lcb_get_callback
lcb_RESPCALLBACK lcb_get_callback(lcb_INSTANCE *instance, int cbtype)
lcb_is_redacting_logs
int lcb_is_redacting_logs(lcb_INSTANCE *instance)
Returns whether the library redacting logs for this connection instance.
LCB_HTTP_TYPE_RAW
@ LCB_HTTP_TYPE_RAW
Execute an arbitrary request against a host and port.
Definition: couchbase.h:1477
lcb_wait
lcb_STATUS lcb_wait(lcb_INSTANCE *instance, lcb_WAITFLAGS flags)
Wait for completion of scheduled operations.
lcb_cmdanalytics_parent_span
lcb_STATUS lcb_cmdanalytics_parent_span(lcb_CMDANALYTICS *cmd, lcbtrace_SPAN *span)
Associate parent tracing span with the Analytics request.
lcb_HTTP_METHOD
lcb_HTTP_METHOD
HTTP Request method enumeration These just enumerate the various types of HTTP request methods suppor...
Definition: couchbase.h:1504
LCB_CALLBACK_GETCID
@ LCB_CALLBACK_GETCID
lcb_getcid()
Definition: couchbase.h:490
LCB_QUERY_CONSISTENCY_NONE
@ LCB_QUERY_CONSISTENCY_NONE
No consistency constraints.
Definition: couchbase.h:2728
lcb_INSTANCE_TYPE
lcb_INSTANCE_TYPE
Handle types.
Definition: couchbase.h:254
LCB_BTYPE_COUCHBASE
@ LCB_BTYPE_COUCHBASE
Data persisted and replicated.
Definition: couchbase.h:241
lcb_cmdquery_destroy
lcb_STATUS lcb_cmdquery_destroy(lcb_CMDQUERY *cmd)
Free the command structure.
LCB_QUERY_CONSISTENCY_STATEMENT
@ LCB_QUERY_CONSISTENCY_STATEMENT
Refresh the snapshot for each statement.
Definition: couchbase.h:2741
LCB_CALLBACK_SDLOOKUP
@ LCB_CALLBACK_SDLOOKUP
<for lcb_storedur3()
Definition: couchbase.h:484
lcb_analytics_cancel
lcb_STATUS lcb_analytics_cancel(lcb_INSTANCE *instance, lcb_ANALYTICS_HANDLE *handle)
Cancels an in-progress request.
LCB_HTTP_TYPE_VIEW
@ LCB_HTTP_TYPE_VIEW
Execute a request against the bucket.
Definition: couchbase.h:1464
lcb_cmdquery_option
lcb_STATUS lcb_cmdquery_option(lcb_CMDQUERY *cmd, const char *name, size_t name_len, const char *value, size_t value_len)
Set a query option.
lcb_respsearch_handle
lcb_STATUS lcb_respsearch_handle(const lcb_RESPSEARCH *resp, lcb_SEARCH_HANDLE **handle)
Get search handle from search response.
lcb_RESPUNLOCK
struct lcb_RESPUNLOCK_ lcb_RESPUNLOCK
Unlock a previously locked item using lcb_cmdunlock.
Definition: couchbase.h:1229
lcb_respanalytics_handle
lcb_STATUS lcb_respanalytics_handle(const lcb_RESPANALYTICS *resp, lcb_ANALYTICS_HANDLE **handle)
Get handle to analytics query.
lcb_breakout
void lcb_breakout(lcb_INSTANCE *instance)
Forcefully break from the event loop.
lcb_cntl_exists
int lcb_cntl_exists(int ctl)
Determine if a specific control code exists.
lcb_RESPFLAGS
lcb_RESPFLAGS
Response flags.
Definition: couchbase.h:427
LCB_CALLBACK_DIAG
@ LCB_CALLBACK_DIAG
lcb_diag()
Definition: couchbase.h:488
LCB_CALLBACK_STORE
@ LCB_CALLBACK_STORE
lcb_store()
Definition: couchbase.h:469
lcb_get_bootstrap_status
lcb_STATUS lcb_get_bootstrap_status(lcb_INSTANCE *instance)
Gets the initial bootstrap status.
LCB_CALLBACK_COUNTER
@ LCB_CALLBACK_COUNTER
lcb_counter()
Definition: couchbase.h:470
lcb_connect
lcb_STATUS lcb_connect(lcb_INSTANCE *instance)
Schedule the initial connection This function will schedule the initial connection for the handle.
LCB_WAIT_DEFAULT
@ LCB_WAIT_DEFAULT
Behave like the old lcb_wait()
Definition: couchbase.h:1768
lcb_DURABILITY_LEVEL
lcb_DURABILITY_LEVEL
Definition: couchbase.h:521
lcb_bootstrap_callback
void(* lcb_bootstrap_callback)(lcb_INSTANCE *instance, lcb_STATUS err)
Bootstrap callback.
Definition: couchbase.h:351
lcb_QUERY_CALLBACK
void(* lcb_QUERY_CALLBACK)(lcb_INSTANCE *, int, const lcb_RESPQUERY *)
Callback to be invoked for each row.
Definition: couchbase.h:2724
lcb_create
lcb_STATUS lcb_create(lcb_INSTANCE **instance, const lcb_CREATEOPTS *options)
Create an instance of lcb.
lcb_CMDQUERY
struct lcb_CMDQUERY_ lcb_CMDQUERY
Opaque query command structure.
Definition: couchbase.h:2712
lcb_cmdanalytics_handle
lcb_STATUS lcb_cmdanalytics_handle(lcb_CMDANALYTICS *cmd, lcb_ANALYTICS_HANDLE **handle)
Get handle to analytics query.
LCB_RESP_F_SDSINGLE
@ LCB_RESP_F_SDSINGLE
Flag, only valid for subdoc responses, indicates that the response was processed using the single-ope...
Definition: couchbase.h:447
lcb_ANALYTICS_CONSISTENCY
lcb_ANALYTICS_CONSISTENCY
Definition: couchbase.h:2403
LCB_CALLBACK_VERBOSITY
@ LCB_CALLBACK_VERBOSITY
lcb_server_verbosity()
Definition: couchbase.h:476
kvbuf.h
lcb_analytics
lcb_STATUS lcb_analytics(lcb_INSTANCE *instance, void *cookie, const lcb_CMDANALYTICS *cmd)
Execute a Analytics query.
LCB_DURABILITYLEVEL_MAJORITY
@ LCB_DURABILITYLEVEL_MAJORITY
Mutation must be replicated to (i.e.
Definition: couchbase.h:528
lcb_STATUS
lcb_STATUS
Error codes returned by the library.
Definition: error.h:202
LCB_CALLBACK_GETREPLICA
@ LCB_CALLBACK_GETREPLICA
lcb_getreplica()
Definition: couchbase.h:478
lcb_RESPANALYTICS
struct lcb_RESPANALYTICS_ lcb_RESPANALYTICS
Response for a Analytics query.
Definition: couchbase.h:2359
lcb_cmdquery_scope_qualifier
lcb_STATUS lcb_cmdquery_scope_qualifier(lcb_CMDQUERY *cmd, const char *qualifier, size_t qualifier_len)
lcb_INSTANCE
struct lcb_st lcb_INSTANCE
Definition: couchbase.h:35
error.h
Definition of all of the error codes used by libcouchbase.
lcb_REPLICA_MODE
lcb_REPLICA_MODE
Spool a single get-with-replica request.
Definition: couchbase.h:776
lcb_sched_leave
void lcb_sched_leave(lcb_INSTANCE *instance)
Leave the current scheduling context, scheduling the commands within the context to be flushed to the...
LCB_TYPE_CLUSTER
@ LCB_TYPE_CLUSTER
Handle for administrative access.
Definition: couchbase.h:256
LCB_CALLBACK_GET
@ LCB_CALLBACK_GET
lcb_get()
Definition: couchbase.h:468
lcb_cmdquery_encoded_payload
lcb_STATUS lcb_cmdquery_encoded_payload(lcb_CMDQUERY *cmd, const char **payload, size_t *payload_len)
Get the JSON-encoded query payload.
lcb_destroy_async
void lcb_destroy_async(lcb_INSTANCE *instance, const void *arg)
Asynchronously schedule the destruction of an instance.
LCB_CALLBACK_DEFAULT
@ LCB_CALLBACK_DEFAULT
Default callback invoked as a fallback.
Definition: couchbase.h:467
lcb_set_destroy_callback
lcb_destroy_callback lcb_set_destroy_callback(lcb_INSTANCE *instance, lcb_destroy_callback)
Set the callback to be invoked when the instance is destroyed asynchronously.
lcb_strcbtype
const char * lcb_strcbtype(int cbtype)
Returns the type of the callback as a string.
lcb_cmdquery_consistency
lcb_STATUS lcb_cmdquery_consistency(lcb_CMDQUERY *cmd, lcb_QUERY_CONSISTENCY mode)
Sets the consistency mode for the request.
LCB_CALLBACK_CBFLUSH
@ LCB_CALLBACK_CBFLUSH
lcb_cbflush3()
Definition: couchbase.h:481
lcb_VIEW_HANDLE
struct lcb_VIEW_HANDLE_ lcb_VIEW_HANDLE
Pointer for request instance.
Definition: couchbase.h:3025
lcb_is_waiting
int lcb_is_waiting(lcb_INSTANCE *instance)
Check if instance is blocked in the event loop.
lcb_http_cancel
lcb_STATUS lcb_http_cancel(lcb_INSTANCE *instance, lcb_HTTP_HANDLE *handle)
Cancel ongoing HTTP request.
LCB_CALLBACK_VERSIONS
@ LCB_CALLBACK_VERSIONS
lcb_server_versions()
Definition: couchbase.h:475
LCB_RESP_F_EXTDATA
@ LCB_RESP_F_EXTDATA
The response has additional internal data.
Definition: couchbase.h:443
LCB_CALLBACK_TOUCH
@ LCB_CALLBACK_TOUCH
lcb_touch()
Definition: couchbase.h:471
lcb_cmdquery_named_param
lcb_STATUS lcb_cmdquery_named_param(lcb_CMDQUERY *cmd, const char *name, size_t name_len, const char *value, size_t value_len)
Sets a named argument for the query.
lcb_set_auth
void lcb_set_auth(lcb_INSTANCE *instance, lcb_AUTHENTICATOR *auth)
Sets the authenticator object for the instance.
lcb_cmdquery_parent_span
lcb_STATUS lcb_cmdquery_parent_span(lcb_CMDQUERY *cmd, lcbtrace_SPAN *span)
Associate parent tracing span with the N1QL request.
LCB_HTTP_TYPE_MANAGEMENT
@ LCB_HTTP_TYPE_MANAGEMENT
Execute a management API request.
Definition: couchbase.h:1472
LCB_CALLBACK_UNLOCK
@ LCB_CALLBACK_UNLOCK
lcb_unlock()
Definition: couchbase.h:473
lcb_RESPGET
struct lcb_RESPGET_ lcb_RESPGET
Command for retrieving a single item.
Definition: couchbase.h:685
lcb_get_version
const char * lcb_get_version(lcb_U32 *version)
Get the version of the library.
lcb_cmdquery_payload
lcb_STATUS lcb_cmdquery_payload(lcb_CMDQUERY *cmd, const char *query, size_t query_len)
Sets the JSON-encodes query payload to be executed.
LCB_QUERY_CONSISTENCY_REQUEST
@ LCB_QUERY_CONSISTENCY_REQUEST
Refresh the snapshot for each request.
Definition: couchbase.h:2738
LCB_CALLBACK_NOOP
@ LCB_CALLBACK_NOOP
lcb_noop3()
Definition: couchbase.h:486
lcb_refresh_config
void lcb_refresh_config(lcb_INSTANCE *instance)
Force the library to refetch the cluster configuration.
lcb_set_open_callback
lcb_open_callback lcb_set_open_callback(lcb_INSTANCE *instance, lcb_open_callback callback)
Callback to be called when bucket is opened.
lcb_HTTP_TYPE
lcb_HTTP_TYPE
The type of HTTP request to execute.
Definition: couchbase.h:1459
LCB_STORE_UPSERT
@ LCB_STORE_UPSERT
The default storage mode.
Definition: couchbase.h:857
lcb_destroy
void lcb_destroy(lcb_INSTANCE *instance)
Destroy (and release all allocated resources) an instance of lcb.
auth.h
LCB_HTTP_TYPE_ANALYTICS
@ LCB_HTTP_TYPE_ANALYTICS
Execute an Analytics Query.
Definition: couchbase.h:1486
LCB_HTTP_TYPE_QUERY
@ LCB_HTTP_TYPE_QUERY
Execute an N1QL Query.
Definition: couchbase.h:1480
LCB_DURABILITYLEVEL_PERSIST_TO_MAJORITY
@ LCB_DURABILITYLEVEL_PERSIST_TO_MAJORITY
Mutation must be persisted to (i.e.
Definition: couchbase.h:537
LCB_TYPE_BUCKET
@ LCB_TYPE_BUCKET
Handle for data access (default)
Definition: couchbase.h:255
lcb_PING_STATUS
lcb_PING_STATUS
Status of the service.
Definition: couchbase.h:1334
LCB_BTYPE_MEMCACHED
@ LCB_BTYPE_MEMCACHED
Data not persisted and not replicated.
Definition: couchbase.h:243
lcb_sched_fail
void lcb_sched_fail(lcb_INSTANCE *instance)
Fail all commands in the current scheduling context.
LCB_CALLBACK_EXISTS
@ LCB_CALLBACK_EXISTS
lcb_exists()
Definition: couchbase.h:491
lcb_search_cancel
lcb_STATUS lcb_search_cancel(lcb_INSTANCE *instance, lcb_SEARCH_HANDLE *handle)
Cancel a full-text query in progress.
lcb_cmdquery_reset
lcb_STATUS lcb_cmdquery_reset(lcb_CMDQUERY *cmd)
Reset the lcb_CMDQUERY structure so that it may be reused for a subsequent query.
lcb_sched_flush
void lcb_sched_flush(lcb_INSTANCE *instance)
Request commands to be flushed to the network.
lcb_install_callback
lcb_RESPCALLBACK lcb_install_callback(lcb_INSTANCE *instance, int cbtype, lcb_RESPCALLBACK cb)
LCB_CALLBACK_REMOVE
@ LCB_CALLBACK_REMOVE
lcb_remove()
Definition: couchbase.h:472
LCB_CALLBACK_STATS
@ LCB_CALLBACK_STATS
lcb_stats3()
Definition: couchbase.h:474
lcb_WAITFLAGS
lcb_WAITFLAGS
Flags for lcb_wait()
Definition: couchbase.h:1766
lcb_resphttp_headers
lcb_STATUS lcb_resphttp_headers(const lcb_RESPHTTP *resp, const char *const **headers)
List of key-value headers.
lcb_RESPCALLBACK
void(* lcb_RESPCALLBACK)(lcb_INSTANCE *instance, int cbtype, const lcb_RESPBASE *resp)
Callback invoked for responses.
Definition: couchbase.h:551
lcb_cmdquery_pipeline_cap
lcb_STATUS lcb_cmdquery_pipeline_cap(lcb_CMDQUERY *cmd, int value)
Sets maximum number of items each execution operator can buffer between various operators.
lcb_open
lcb_STATUS lcb_open(lcb_INSTANCE *instance, const char *bucket, size_t bucket_len)
Opens bucket.
LCB_STORE_REPLACE
@ LCB_STORE_REPLACE
Will cause the operation to fail unless the key already exists in the cluster.
Definition: couchbase.h:869
lcb_cntl
lcb_STATUS lcb_cntl(lcb_INSTANCE *instance, int mode, int cmd, void *arg)
This function exposes an ioctl/fcntl-like interface to read and write various configuration propertie...
LCB_RESP_F_FINAL
@ LCB_RESP_F_FINAL
No more responses are to be received for this request.
Definition: couchbase.h:429
LCB_STORE_PREPEND
@ LCB_STORE_PREPEND
Like LCB_STORE_APPEND, but prepends the new value to the existing value.
Definition: couchbase.h:881
LCB_HTTP_TYPE_PING
@ LCB_HTTP_TYPE_PING
Special pseudo-type, for ping endpoints in various services.
Definition: couchbase.h:1493
lcb_RESPREMOVE
struct lcb_RESPREMOVE_ lcb_RESPREMOVE
Spool a removal of an item.
Definition: couchbase.h:1062
LCB_CALLBACK_PING
@ LCB_CALLBACK_PING
lcb_ping3()
Definition: couchbase.h:487
LCB_RESP_F_ERRINFO
@ LCB_RESP_F_ERRINFO
The response has extra error information as value (see SDK-RFC-28).
Definition: couchbase.h:450
lcb_cntl_getu32
lcb_U32 lcb_cntl_getu32(lcb_INSTANCE *instance, int cmd)
Retrieve an lcb_U32 setting.
lcb_cntl_string
lcb_STATUS lcb_cntl_string(lcb_INSTANCE *instance, const char *key, const char *value)
Alternatively one may change configuration settings by passing a string key and value.
lcb_cmdquery_readonly
lcb_STATUS lcb_cmdquery_readonly(lcb_CMDQUERY *cmd, int readonly)
Marks query as read-only.
lcb_QUERY_HANDLE
struct lcb_QUERY_HANDLE_ lcb_QUERY_HANDLE
Pointer for request instance.
Definition: couchbase.h:2716
lcb_search
lcb_STATUS lcb_search(lcb_INSTANCE *instance, void *cookie, const lcb_CMDSEARCH *cmd)
Issue a full-text query.