Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Couchbase/ClusterOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class ClusterOptions
private ?bool $enableTracing = null;
private ?bool $enableUnorderedExecution = null;
private ?bool $showQueries = null;
private ?bool $enableLazyConnections = null;

private ?string $network = null;
private ?string $trustCertificate = null;
Expand Down Expand Up @@ -546,6 +547,20 @@ public function getTransactionsConfiguration(): ?TransactionsConfiguration
return $this->transactionsConfiguration;
}

/**
* @param bool $enable
*
* @return ClusterOptions
* @since 4.5.0
*
* @VOLATILE: This API is subject to change at any time.
*/
public function enableLazyConnections(bool $enable): ClusterOptions
{
$this->enableLazyConnections = $enable;
return $this;
}

/**
* @return string the string that uniquely identifies particular authenticator layout
* @throws InvalidArgumentException
Expand Down Expand Up @@ -610,6 +625,7 @@ public function export(): array
'enableUnorderedExecution' => $this->enableUnorderedExecution,
'useIpProtocol' => $this->useIpProtocol,
'showQueries' => $this->showQueries,
'enableLazyConnections' => $this->enableLazyConnections,

'network' => $this->network,
'trustCertificate' => $this->trustCertificate,
Expand Down
2 changes: 2 additions & 0 deletions bin/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def which(name, extra_locations = [])
cmake_flags = [
"-S#{cxx_core_source_dir}",
"-B#{cxx_core_build_dir}",
"-DCOUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_TESTS=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_TOOLS=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_DOCS=OFF",
Expand Down Expand Up @@ -170,6 +171,7 @@ def which(name, extra_locations = [])
cmake_flags = [
"-S#{cxx_core_source_dir}",
"-B#{cxx_core_build_dir}",
"-DCOUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_TESTS=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_TOOLS=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_DOCS=OFF",
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ string(
set(COUCHBASE_CXX_CLIENT_WRAPPER_UNIFIED_ID
"php/${CMAKE_MATCH_1}"
CACHE STRING "" FORCE)
set(COUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY
OFF
CACHE BOOL "" FORCE)
set(COUCHBASE_CXX_CLIENT_BUILD_DOCS
OFF
CACHE BOOL "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion src/deps/couchbase-cxx-client
15 changes: 9 additions & 6 deletions src/wrapper/connection_handle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
#include "passthrough_transcoder.hxx"
#include "version.hxx"

#define COUCHBASE_CXX_CLIENT_IGNORE_CORE_DEPRECATIONS
#include <core/cluster.hxx>
#include <core/error_context/analytics.hxx>
#include <core/error_context/search.hxx>
#include <core/error_context/view.hxx>
#include <core/logger/logger.hxx>
#include <core/management/bucket_settings.hxx>
#include <core/operations.hxx>
#include <core/operations/document_view.hxx>
#include <core/operations/management/analytics.hxx>
#include <core/operations/management/bucket.hxx>
#include <core/operations/management/cluster_describe.hxx>
Expand Down Expand Up @@ -3630,9 +3632,7 @@ zval_to_bucket_settings(const zval* bucket_settings)
return { e, {} };
}

if (auto e = cb_assign_integer(
bucket.num_vbuckets, bucket_settings, "numVBuckets");
e.ec) {
if (auto e = cb_assign_integer(bucket.num_vbuckets, bucket_settings, "numVBuckets"); e.ec) {
return { e, {} };
}

Expand Down Expand Up @@ -3828,8 +3828,7 @@ cb_bucket_settings_to_zval(
}

if (bucket_settings.num_vbuckets.has_value()) {
add_assoc_long(
return_value, "numVBuckets", bucket_settings.num_vbuckets.value());
add_assoc_long(return_value, "numVBuckets", bucket_settings.num_vbuckets.value());
}

return {};
Expand Down Expand Up @@ -6067,6 +6066,9 @@ apply_options(couchbase::cluster_options& cluster_options, zval* options) -> cor
options::assign_boolean(ZEND_STRL("enableTcpKeepAlive"), key, value, [&](auto v) {
cluster_options.network().enable_tcp_keep_alive(v);
});
options::assign_boolean(ZEND_STRL("enableLazyConnections"), key, value, [&](auto v) {
cluster_options.network().enable_lazy_connections(v);
});
options::assign_boolean(ZEND_STRL("enableUnorderedExecution"), key, value, [&](auto v) {
cluster_options.behavior().enable_unordered_execution(v);
});
Expand Down Expand Up @@ -6223,7 +6225,8 @@ apply_options(couchbase::cluster_options& cluster_options, zval* options) -> cor
ZEND_HASH_FOREACH_END();
}

if (zend_binary_strcmp(ZSTR_VAL(key), ZSTR_LEN(key), ZEND_STRL("appTelemetryConfiguration")) == 0) {
if (zend_binary_strcmp(
ZSTR_VAL(key), ZSTR_LEN(key), ZEND_STRL("appTelemetryConfiguration")) == 0) {
if (value == nullptr || Z_TYPE_P(value) == IS_NULL) {
continue;
}
Expand Down
Loading