From a08230f7eadfeaf454aae75c75024e16595fb85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Czech?= Date: Fri, 21 Nov 2025 13:58:03 +0100 Subject: [PATCH 1/3] Fix typo in client get keyspace Add add regression test for that endpoint --- lib/client.js | 2 +- test/integration/supported/client-execute-tests.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 42b62cae9..bd1b58104 100644 --- a/lib/client.js +++ b/lib/client.js @@ -109,7 +109,7 @@ class Client extends events.EventEmitter { * @type {string | undefined} */ get keyspace() { - return this.rust_client.getKeyspace(); + return this.rustClient.getKeyspace(); } set keyspace(_) { diff --git a/test/integration/supported/client-execute-tests.js b/test/integration/supported/client-execute-tests.js index be25f555b..8cdd24bdd 100644 --- a/test/integration/supported/client-execute-tests.js +++ b/test/integration/supported/client-execute-tests.js @@ -60,6 +60,15 @@ describe("Client @SERVER_API", function () { }); }); + it("should retrieve keyspace name", function (done) { + const client = setupInfo.client; + client.connect(function (err) { + assert.ifError(err); + assert.equal(client.keyspace, setupInfo.keyspace); + done(); + }); + }); + // Would require error throwing refactor // TODO: Fix this test context("with incorrect query parameters", () => { From 98ee9895a446b8e42e68a024f330e486f33121c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Czech?= Date: Fri, 21 Nov 2025 14:06:27 +0100 Subject: [PATCH 2/3] Update integration tests with warning --- test/integration/supported/client-each-row-tests.js | 2 +- .../supported/client-execute-prepared-tests.js | 2 +- test/integration/supported/client-execute-tests.js | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/test/integration/supported/client-each-row-tests.js b/test/integration/supported/client-each-row-tests.js index fdb345c4e..797aa8ea0 100644 --- a/test/integration/supported/client-each-row-tests.js +++ b/test/integration/supported/client-each-row-tests.js @@ -846,7 +846,7 @@ describe("Client", function () { ); }); */ // TODO: Fix this test - // No support for warnings in ResultSet + // Rust driver throws an error, instead of returning a warning /* vit( "2.2", "should include the warning in the ResultSet", diff --git a/test/integration/supported/client-execute-prepared-tests.js b/test/integration/supported/client-execute-prepared-tests.js index 5f81bb84e..dc77f4889 100644 --- a/test/integration/supported/client-execute-prepared-tests.js +++ b/test/integration/supported/client-execute-prepared-tests.js @@ -1054,8 +1054,8 @@ describe("Client @SERVER_API", function () { ); }); - // No support for warnings in result set // TODO: fix this test + // Rust driver throws an error, instead of returning a warning /* vit( "2.2", "should include the warning in the ResultSet", diff --git a/test/integration/supported/client-execute-tests.js b/test/integration/supported/client-execute-tests.js index 8cdd24bdd..43c12b31e 100644 --- a/test/integration/supported/client-execute-tests.js +++ b/test/integration/supported/client-execute-tests.js @@ -1088,9 +1088,7 @@ describe("Client @SERVER_API", function () { ); }); - // No support for info field - // TODO: Fix this test - /* vit( + vit( "2.2", "should include the warning in the ResultSet", function (done) { @@ -1124,14 +1122,14 @@ describe("Client @SERVER_API", function () { assert.strictEqual(result.info.warnings.length, 1); helper.assertContains(result.info.warnings[0], "batch"); helper.assertContains(result.info.warnings[0], "exceeding"); - assert.ok(loggedMessage); + // TODO: Fix this test + // Client does not expose log events. + /* assert.ok(loggedMessage); */ done(); }); }, - ); */ + ); - // No support for buffer as input to any data type - // TODO: Fix this test it("should support buffer as input for any data type", () => { const buffer4 = utils.allocBufferFromArray([0, 0, 0, 1]); const buffer8 = utils.allocBuffer(8); From 0ab5d3bd4d912b79851b8ec3b8082d0a4f14297e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Czech?= Date: Fri, 21 Nov 2025 17:15:41 +0100 Subject: [PATCH 3/3] Update documentation applicationName, applicationVersion and encoding.useUndefinedAsUnset are already supported by the driver --- lib/client-options.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/client-options.js b/lib/client-options.js index 9391e8f5c..3136753d2 100644 --- a/lib/client-options.js +++ b/lib/client-options.js @@ -53,15 +53,11 @@ const errors = require("./errors.js"); * @property {String} [applicationName] An optional setting identifying the name of the application using * the {@link Client} instance. * - * This value is passed to DSE and is useful as metadata for describing a client connection on the server side. - * - * [TODO: Add support for this field] + * This value is passed to database and is useful as metadata for describing a client connection on the server side. * @property {String} [applicationVersion] An optional setting identifying the version of the application using * the {@link Client} instance. * - * This value is passed to DSE and is useful as metadata for describing a client connection on the server side. - * - * [TODO: Add support for this field] + * This value is passed to database and is useful as metadata for describing a client connection on the server side. * @property {Object} [monitorReporting] Options for reporting mechanism from the client to the DSE server, for * versions that support it. * [TODO: Add support for this field] @@ -228,8 +224,7 @@ const errors = require("./errors.js"); * * [TODO: Add support for this field] * @property {Boolean} [encoding.useUndefinedAsUnset] Valid for Cassandra 2.2 and above. Determines that, if a parameter - * is set to - * `undefined` it should be encoded as `unset`. + * is set to `undefined` it should be encoded as `unset`. * * By default, ECMAScript `undefined` is encoded as `null` in the driver. Cassandra 2.2 * introduced the concept of unset. @@ -237,8 +232,6 @@ const errors = require("./errors.js"); * true allows you to use ECMAScript undefined as Cassandra `unset`. * * Default: true. - * - * [TODO: Add support for this field] * @property {Boolean} [encoding.useBigIntAsLong] Use [BigInt ECMAScript type](https://tc39.github.io/proposal-bigint/) * to represent CQL bigint and counter data types. * [TODO: Add support for this field]