couchbase 4.2.6 → 4.2.7
Sign up to get free protection for your applications and to get access to all the features.
- package/deps/couchbase-cxx-client/.github/workflows/windows.yml +0 -3
- package/deps/couchbase-cxx-client/CMakeLists.txt +4 -0
- package/deps/couchbase-cxx-client/bin/build-tests.rb +1 -1
- package/deps/couchbase-cxx-client/core/impl/lookup_in.cxx +1 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.cxx +176 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.hxx +80 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.cxx +167 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.hxx +75 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.cxx +97 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +67 -0
- package/deps/couchbase-cxx-client/core/meta/features.hxx +13 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +192 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +188 -0
- package/deps/couchbase-cxx-client/core/operations.hxx +2 -0
- package/deps/couchbase-cxx-client/core/protocol/cmd_hello.hxx +1 -0
- package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in_replica.cxx +107 -0
- package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in_replica.hxx +137 -0
- package/deps/couchbase-cxx-client/core/protocol/hello_feature.hxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/hello_feature_fmt.hxx +3 -0
- package/deps/couchbase-cxx-client/core/topology/capabilities.hxx +1 -0
- package/deps/couchbase-cxx-client/core/topology/capabilities_fmt.hxx +3 -0
- package/deps/couchbase-cxx-client/core/topology/configuration.hxx +5 -0
- package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +111 -0
- package/deps/couchbase-cxx-client/couchbase/get_and_lock_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/get_and_touch_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/get_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/insert_options.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/lookup_in_all_replicas_options.hxx +109 -0
- package/deps/couchbase-cxx-client/couchbase/lookup_in_any_replica_options.hxx +101 -0
- package/deps/couchbase-cxx-client/couchbase/lookup_in_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/lookup_in_replica_result.hxx +74 -0
- package/deps/couchbase-cxx-client/couchbase/lookup_in_result.hxx +26 -0
- package/deps/couchbase-cxx-client/couchbase/mutate_in_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/remove_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/replace_options.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/touch_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/unlock_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/upsert_options.hxx +3 -3
- package/deps/couchbase-cxx-client/test/test_integration_subdoc.cxx +655 -0
- package/dist/binding.d.ts +45 -0
- package/dist/collection.d.ts +53 -1
- package/dist/collection.js +139 -1
- package/dist/crudoptypes.d.ts +24 -0
- package/dist/crudoptypes.js +14 -1
- package/package.json +13 -13
- package/src/connection.cpp +4 -0
- package/src/connection.hpp +2 -0
- package/src/connection_autogen.cpp +28 -0
- package/src/jstocbpp_autogen.hpp +262 -0
package/src/jstocbpp_autogen.hpp
CHANGED
@@ -2915,6 +2915,152 @@ struct js_to_cbpp_t<couchbase::core::operations::get_request> {
|
|
2915
2915
|
}
|
2916
2916
|
};
|
2917
2917
|
|
2918
|
+
template <>
|
2919
|
+
struct js_to_cbpp_t<
|
2920
|
+
couchbase::core::operations::lookup_in_all_replicas_response> {
|
2921
|
+
static inline couchbase::core::operations::lookup_in_all_replicas_response
|
2922
|
+
from_js(Napi::Value jsVal)
|
2923
|
+
{
|
2924
|
+
auto jsObj = jsVal.ToObject();
|
2925
|
+
couchbase::core::operations::lookup_in_all_replicas_response cppObj;
|
2926
|
+
// ctx
|
2927
|
+
js_to_cbpp<std::vector<couchbase::core::operations::
|
2928
|
+
lookup_in_all_replicas_response::entry>>(
|
2929
|
+
cppObj.entries, jsObj.Get("entries"));
|
2930
|
+
return cppObj;
|
2931
|
+
}
|
2932
|
+
static inline Napi::Value
|
2933
|
+
to_js(Napi::Env env,
|
2934
|
+
const couchbase::core::operations::lookup_in_all_replicas_response
|
2935
|
+
&cppObj)
|
2936
|
+
{
|
2937
|
+
auto resObj = Napi::Object::New(env);
|
2938
|
+
// ctx
|
2939
|
+
resObj.Set(
|
2940
|
+
"entries",
|
2941
|
+
cbpp_to_js<std::vector<couchbase::core::operations::
|
2942
|
+
lookup_in_all_replicas_response::entry>>(
|
2943
|
+
env, cppObj.entries));
|
2944
|
+
return resObj;
|
2945
|
+
}
|
2946
|
+
};
|
2947
|
+
|
2948
|
+
template <>
|
2949
|
+
struct js_to_cbpp_t<
|
2950
|
+
couchbase::core::operations::lookup_in_all_replicas_response::entry> {
|
2951
|
+
static inline couchbase::core::operations::lookup_in_all_replicas_response::
|
2952
|
+
entry
|
2953
|
+
from_js(Napi::Value jsVal)
|
2954
|
+
{
|
2955
|
+
auto jsObj = jsVal.ToObject();
|
2956
|
+
couchbase::core::operations::lookup_in_all_replicas_response::entry
|
2957
|
+
cppObj;
|
2958
|
+
js_to_cbpp<std::vector<
|
2959
|
+
couchbase::core::operations::lookup_in_all_replicas_response::
|
2960
|
+
entry::lookup_in_entry>>(cppObj.fields, jsObj.Get("fields"));
|
2961
|
+
js_to_cbpp<couchbase::cas>(cppObj.cas, jsObj.Get("cas"));
|
2962
|
+
js_to_cbpp<bool>(cppObj.deleted, jsObj.Get("deleted"));
|
2963
|
+
js_to_cbpp<bool>(cppObj.is_replica, jsObj.Get("is_replica"));
|
2964
|
+
return cppObj;
|
2965
|
+
}
|
2966
|
+
static inline Napi::Value
|
2967
|
+
to_js(Napi::Env env, const couchbase::core::operations::
|
2968
|
+
lookup_in_all_replicas_response::entry &cppObj)
|
2969
|
+
{
|
2970
|
+
auto resObj = Napi::Object::New(env);
|
2971
|
+
resObj.Set(
|
2972
|
+
"fields",
|
2973
|
+
cbpp_to_js<std::vector<
|
2974
|
+
couchbase::core::operations::lookup_in_all_replicas_response::
|
2975
|
+
entry::lookup_in_entry>>(env, cppObj.fields));
|
2976
|
+
resObj.Set("cas", cbpp_to_js<couchbase::cas>(env, cppObj.cas));
|
2977
|
+
resObj.Set("deleted", cbpp_to_js<bool>(env, cppObj.deleted));
|
2978
|
+
resObj.Set("is_replica", cbpp_to_js<bool>(env, cppObj.is_replica));
|
2979
|
+
return resObj;
|
2980
|
+
}
|
2981
|
+
};
|
2982
|
+
|
2983
|
+
template <>
|
2984
|
+
struct js_to_cbpp_t<
|
2985
|
+
couchbase::core::operations::lookup_in_all_replicas_response::entry::
|
2986
|
+
lookup_in_entry> {
|
2987
|
+
static inline couchbase::core::operations::lookup_in_all_replicas_response::
|
2988
|
+
entry::lookup_in_entry
|
2989
|
+
from_js(Napi::Value jsVal)
|
2990
|
+
{
|
2991
|
+
auto jsObj = jsVal.ToObject();
|
2992
|
+
couchbase::core::operations::lookup_in_all_replicas_response::entry::
|
2993
|
+
lookup_in_entry cppObj;
|
2994
|
+
js_to_cbpp<std::string>(cppObj.path, jsObj.Get("path"));
|
2995
|
+
js_to_cbpp<std::vector<std::byte>>(cppObj.value, jsObj.Get("value"));
|
2996
|
+
js_to_cbpp<std::size_t>(cppObj.original_index,
|
2997
|
+
jsObj.Get("original_index"));
|
2998
|
+
js_to_cbpp<bool>(cppObj.exists, jsObj.Get("exists"));
|
2999
|
+
js_to_cbpp<couchbase::core::protocol::subdoc_opcode>(
|
3000
|
+
cppObj.opcode, jsObj.Get("opcode"));
|
3001
|
+
js_to_cbpp<couchbase::key_value_status_code>(cppObj.status,
|
3002
|
+
jsObj.Get("status"));
|
3003
|
+
js_to_cbpp<std::error_code>(cppObj.ec, jsObj.Get("ec"));
|
3004
|
+
return cppObj;
|
3005
|
+
}
|
3006
|
+
static inline Napi::Value
|
3007
|
+
to_js(Napi::Env env,
|
3008
|
+
const couchbase::core::operations::lookup_in_all_replicas_response::
|
3009
|
+
entry::lookup_in_entry &cppObj)
|
3010
|
+
{
|
3011
|
+
auto resObj = Napi::Object::New(env);
|
3012
|
+
resObj.Set("path", cbpp_to_js<std::string>(env, cppObj.path));
|
3013
|
+
resObj.Set("value",
|
3014
|
+
cbpp_to_js<std::vector<std::byte>>(env, cppObj.value));
|
3015
|
+
resObj.Set("original_index",
|
3016
|
+
cbpp_to_js<std::size_t>(env, cppObj.original_index));
|
3017
|
+
resObj.Set("exists", cbpp_to_js<bool>(env, cppObj.exists));
|
3018
|
+
resObj.Set("opcode",
|
3019
|
+
cbpp_to_js<couchbase::core::protocol::subdoc_opcode>(
|
3020
|
+
env, cppObj.opcode));
|
3021
|
+
resObj.Set("status", cbpp_to_js<couchbase::key_value_status_code>(
|
3022
|
+
env, cppObj.status));
|
3023
|
+
resObj.Set("ec", cbpp_to_js<std::error_code>(env, cppObj.ec));
|
3024
|
+
return resObj;
|
3025
|
+
}
|
3026
|
+
};
|
3027
|
+
|
3028
|
+
template <>
|
3029
|
+
struct js_to_cbpp_t<
|
3030
|
+
couchbase::core::operations::lookup_in_all_replicas_request> {
|
3031
|
+
static inline couchbase::core::operations::lookup_in_all_replicas_request
|
3032
|
+
from_js(Napi::Value jsVal)
|
3033
|
+
{
|
3034
|
+
auto jsObj = jsVal.ToObject();
|
3035
|
+
couchbase::core::operations::lookup_in_all_replicas_request cppObj;
|
3036
|
+
js_to_cbpp<couchbase::core::document_id>(cppObj.id, jsObj.Get("id"));
|
3037
|
+
js_to_cbpp<std::vector<couchbase::core::impl::subdoc::command>>(
|
3038
|
+
cppObj.specs, jsObj.Get("specs"));
|
3039
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
3040
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
3041
|
+
// parent_span
|
3042
|
+
return cppObj;
|
3043
|
+
}
|
3044
|
+
static inline Napi::Value
|
3045
|
+
to_js(Napi::Env env,
|
3046
|
+
const couchbase::core::operations::lookup_in_all_replicas_request
|
3047
|
+
&cppObj)
|
3048
|
+
{
|
3049
|
+
auto resObj = Napi::Object::New(env);
|
3050
|
+
resObj.Set("id",
|
3051
|
+
cbpp_to_js<couchbase::core::document_id>(env, cppObj.id));
|
3052
|
+
resObj.Set(
|
3053
|
+
"specs",
|
3054
|
+
cbpp_to_js<std::vector<couchbase::core::impl::subdoc::command>>(
|
3055
|
+
env, cppObj.specs));
|
3056
|
+
resObj.Set("timeout",
|
3057
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
3058
|
+
env, cppObj.timeout));
|
3059
|
+
// parent_span
|
3060
|
+
return resObj;
|
3061
|
+
}
|
3062
|
+
};
|
3063
|
+
|
2918
3064
|
template <>
|
2919
3065
|
struct js_to_cbpp_t<couchbase::core::operations::analytics_response> {
|
2920
3066
|
static inline couchbase::core::operations::analytics_response
|
@@ -4412,6 +4558,122 @@ struct js_to_cbpp_t<
|
|
4412
4558
|
}
|
4413
4559
|
};
|
4414
4560
|
|
4561
|
+
template <>
|
4562
|
+
struct js_to_cbpp_t<
|
4563
|
+
couchbase::core::operations::lookup_in_any_replica_response> {
|
4564
|
+
static inline couchbase::core::operations::lookup_in_any_replica_response
|
4565
|
+
from_js(Napi::Value jsVal)
|
4566
|
+
{
|
4567
|
+
auto jsObj = jsVal.ToObject();
|
4568
|
+
couchbase::core::operations::lookup_in_any_replica_response cppObj;
|
4569
|
+
// ctx
|
4570
|
+
js_to_cbpp<couchbase::cas>(cppObj.cas, jsObj.Get("cas"));
|
4571
|
+
js_to_cbpp<std::vector<couchbase::core::operations::
|
4572
|
+
lookup_in_any_replica_response::entry>>(
|
4573
|
+
cppObj.fields, jsObj.Get("fields"));
|
4574
|
+
js_to_cbpp<bool>(cppObj.deleted, jsObj.Get("deleted"));
|
4575
|
+
js_to_cbpp<bool>(cppObj.is_replica, jsObj.Get("is_replica"));
|
4576
|
+
return cppObj;
|
4577
|
+
}
|
4578
|
+
static inline Napi::Value
|
4579
|
+
to_js(Napi::Env env,
|
4580
|
+
const couchbase::core::operations::lookup_in_any_replica_response
|
4581
|
+
&cppObj)
|
4582
|
+
{
|
4583
|
+
auto resObj = Napi::Object::New(env);
|
4584
|
+
// ctx
|
4585
|
+
resObj.Set("cas", cbpp_to_js<couchbase::cas>(env, cppObj.cas));
|
4586
|
+
resObj.Set(
|
4587
|
+
"fields",
|
4588
|
+
cbpp_to_js<std::vector<couchbase::core::operations::
|
4589
|
+
lookup_in_any_replica_response::entry>>(
|
4590
|
+
env, cppObj.fields));
|
4591
|
+
resObj.Set("deleted", cbpp_to_js<bool>(env, cppObj.deleted));
|
4592
|
+
resObj.Set("is_replica", cbpp_to_js<bool>(env, cppObj.is_replica));
|
4593
|
+
return resObj;
|
4594
|
+
}
|
4595
|
+
};
|
4596
|
+
|
4597
|
+
template <>
|
4598
|
+
struct js_to_cbpp_t<
|
4599
|
+
couchbase::core::operations::lookup_in_any_replica_response::entry> {
|
4600
|
+
static inline couchbase::core::operations::lookup_in_any_replica_response::
|
4601
|
+
entry
|
4602
|
+
from_js(Napi::Value jsVal)
|
4603
|
+
{
|
4604
|
+
auto jsObj = jsVal.ToObject();
|
4605
|
+
couchbase::core::operations::lookup_in_any_replica_response::entry
|
4606
|
+
cppObj;
|
4607
|
+
js_to_cbpp<std::string>(cppObj.path, jsObj.Get("path"));
|
4608
|
+
js_to_cbpp<std::vector<std::byte>>(cppObj.value, jsObj.Get("value"));
|
4609
|
+
js_to_cbpp<std::size_t>(cppObj.original_index,
|
4610
|
+
jsObj.Get("original_index"));
|
4611
|
+
js_to_cbpp<bool>(cppObj.exists, jsObj.Get("exists"));
|
4612
|
+
js_to_cbpp<couchbase::core::protocol::subdoc_opcode>(
|
4613
|
+
cppObj.opcode, jsObj.Get("opcode"));
|
4614
|
+
js_to_cbpp<couchbase::key_value_status_code>(cppObj.status,
|
4615
|
+
jsObj.Get("status"));
|
4616
|
+
js_to_cbpp<std::error_code>(cppObj.ec, jsObj.Get("ec"));
|
4617
|
+
return cppObj;
|
4618
|
+
}
|
4619
|
+
static inline Napi::Value to_js(
|
4620
|
+
Napi::Env env,
|
4621
|
+
const couchbase::core::operations::lookup_in_any_replica_response::entry
|
4622
|
+
&cppObj)
|
4623
|
+
{
|
4624
|
+
auto resObj = Napi::Object::New(env);
|
4625
|
+
resObj.Set("path", cbpp_to_js<std::string>(env, cppObj.path));
|
4626
|
+
resObj.Set("value",
|
4627
|
+
cbpp_to_js<std::vector<std::byte>>(env, cppObj.value));
|
4628
|
+
resObj.Set("original_index",
|
4629
|
+
cbpp_to_js<std::size_t>(env, cppObj.original_index));
|
4630
|
+
resObj.Set("exists", cbpp_to_js<bool>(env, cppObj.exists));
|
4631
|
+
resObj.Set("opcode",
|
4632
|
+
cbpp_to_js<couchbase::core::protocol::subdoc_opcode>(
|
4633
|
+
env, cppObj.opcode));
|
4634
|
+
resObj.Set("status", cbpp_to_js<couchbase::key_value_status_code>(
|
4635
|
+
env, cppObj.status));
|
4636
|
+
resObj.Set("ec", cbpp_to_js<std::error_code>(env, cppObj.ec));
|
4637
|
+
return resObj;
|
4638
|
+
}
|
4639
|
+
};
|
4640
|
+
|
4641
|
+
template <>
|
4642
|
+
struct js_to_cbpp_t<
|
4643
|
+
couchbase::core::operations::lookup_in_any_replica_request> {
|
4644
|
+
static inline couchbase::core::operations::lookup_in_any_replica_request
|
4645
|
+
from_js(Napi::Value jsVal)
|
4646
|
+
{
|
4647
|
+
auto jsObj = jsVal.ToObject();
|
4648
|
+
couchbase::core::operations::lookup_in_any_replica_request cppObj;
|
4649
|
+
js_to_cbpp<couchbase::core::document_id>(cppObj.id, jsObj.Get("id"));
|
4650
|
+
js_to_cbpp<std::vector<couchbase::core::impl::subdoc::command>>(
|
4651
|
+
cppObj.specs, jsObj.Get("specs"));
|
4652
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
4653
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
4654
|
+
// parent_span
|
4655
|
+
return cppObj;
|
4656
|
+
}
|
4657
|
+
static inline Napi::Value
|
4658
|
+
to_js(Napi::Env env,
|
4659
|
+
const couchbase::core::operations::lookup_in_any_replica_request
|
4660
|
+
&cppObj)
|
4661
|
+
{
|
4662
|
+
auto resObj = Napi::Object::New(env);
|
4663
|
+
resObj.Set("id",
|
4664
|
+
cbpp_to_js<couchbase::core::document_id>(env, cppObj.id));
|
4665
|
+
resObj.Set(
|
4666
|
+
"specs",
|
4667
|
+
cbpp_to_js<std::vector<couchbase::core::impl::subdoc::command>>(
|
4668
|
+
env, cppObj.specs));
|
4669
|
+
resObj.Set("timeout",
|
4670
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
4671
|
+
env, cppObj.timeout));
|
4672
|
+
// parent_span
|
4673
|
+
return resObj;
|
4674
|
+
}
|
4675
|
+
};
|
4676
|
+
|
4415
4677
|
template <>
|
4416
4678
|
struct js_to_cbpp_t<couchbase::core::operations::mutate_in_response> {
|
4417
4679
|
static inline couchbase::core::operations::mutate_in_response
|