Skip to content

4.3.1 Deprecations and breaking changes

Thomas Segismont edited this page Jun 2, 2022 · 2 revisions

Vert.x Web

The request always paused feature was reverted

This feature was introduced to ensure that body parsing or protocol upgrades would never miss the request body, it would cause problems for pipelined requests. For this reason, the feature was reverted and instead, all built-in handlers will explicitly pause and resume the request if asynchronous operations are performed to ensure that the body is not lost to the moment your first handler is called.

OpenAPI RouteBuilder.bodyHandler() is deprecated

Before vert.x 4.3.0 no validation was being made by vert.x to ensure the setup was correct, so OpenAPI would store the BodyHandler as a special handler from the rootHandler() to ensure it would be always the first on the route. This would be a "safe" assumtion, yet not entirely correct.

As of 4.3.1, OpenAPI expects that rootHandler() is called with the right order and this also covers the BodyHandler. For now the old bodyHandler is just and alias to rootHandler() but should be avoided in the future.

// Before 4.3.1
BodyHandler bodyHandler = BodyHandler.create("my-uploads");
routerBuilder.bodyHandler(bodyHandler);

// After
BodyHandler bodyHandler = BodyHandler.create("my-uploads");
routerBuilder.rootHandler(bodyHandler);

Reactive Oracle Client

BLOB and RAW column values returned as io.vertx.core.buffer.Buffer

https://github.com/eclipse-vertx/vertx-sql-client/pull/1192

Previously, BLOB and RAW column values were returned as byte arrays, now they are returned as io.vertx.core.buffer.Buffer

This change was required for consistency when fixing an issue with RAW values as query parameters.

Also, a new type was introduced to write to BLOB columns: io.vertx.oracleclient.data.Blob:

client.preparedQuery("INSERT INTO images (name, data) VALUES (?, ?)")
    // Use io.vertx.oracleclient.data.Blob when inserting
    .execute(Tuple.of("beautiful-sunset.jpg", Blob.copy(imageBuffer)))
    .onComplete(ar -> {
        // Do something
    });

client.preparedQuery("SELECT data FROM images WHERE id = ?")
    .execute(Tuple.of(id))
    .onComplete(ar -> {
        if (ar.succeeded()) {
            Row row = ar.result().iterator().next();

            // Use io.vertx.core.buffer.Buffer when reading
            Buffer data = row.getBuffer("data");
        }
    });

Turn off auto-generated keys retrieval by default

https://github.com/eclipse-vertx/vertx-sql-client/pull/1193

In most cases, this feature is not needed (few applications care for the ROWID). But when this is activated, it is not possible to execute some queries like INSERT...SELECT.

Clone this wiki locally