-
Notifications
You must be signed in to change notification settings - Fork 35
4.3.1 Deprecations and breaking changes
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.
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);
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");
}
});
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
.