From fe19a01a50ff7904f069e01ffa7e7de0dbc4c004 Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 12 Aug 2024 08:59:12 -0400 Subject: [PATCH] Add a proxy for closeCursor for backwards-compatibility. Signed-off-by: dblock --- util/ClientEndpoint.php | 2 +- util/EndpointProxies/sql/closeCursorProxy.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 util/EndpointProxies/sql/closeCursorProxy.php diff --git a/util/ClientEndpoint.php b/util/ClientEndpoint.php index 1acec505..2e3a9f54 100644 --- a/util/ClientEndpoint.php +++ b/util/ClientEndpoint.php @@ -50,7 +50,7 @@ public function renderClass(): string $useNamespace = ''; // The following namespaces do not have OpenSearch API specifications - $patchnamespaces = ['async_search', 'searchable_snapshots', 'ssl', 'sql', 'data_frame_transform_deprecated', 'monitoring']; + $patchnamespaces = ['async_search', 'searchable_snapshots', 'ssl', 'data_frame_transform_deprecated', 'monitoring']; $this->namespace = array_unique(array_merge($this->namespace, $patchnamespaces)); sort($this->namespace); diff --git a/util/EndpointProxies/sql/closeCursorProxy.php b/util/EndpointProxies/sql/closeCursorProxy.php new file mode 100644 index 00000000..8fd7fec4 --- /dev/null +++ b/util/EndpointProxies/sql/closeCursorProxy.php @@ -0,0 +1,12 @@ +close($params); + } +EOD;