From 386dfa4421c4fbc0feee2fef93fe7ac8c7aeb075 Mon Sep 17 00:00:00 2001 From: Michele Rastelli Date: Thu, 10 Nov 2022 13:35:53 +0100 Subject: [PATCH 1/4] http client --- docs/v7_detailed_changes.md | 56 +++++++++++++++++++++---------------- driver/ChangeLog.md | 10 ++++--- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/docs/v7_detailed_changes.md b/docs/v7_detailed_changes.md index 65769cd83..8ca1cf517 100644 --- a/docs/v7_detailed_changes.md +++ b/docs/v7_detailed_changes.md @@ -1,24 +1,26 @@ # Version 7.0: detailed changes +## HTTP client -## Default protocol +The HTTP client has been changed to Vert.x WebClient. `HTTP/2` is now supported. -The default communication protocol is now `HTTP_JSON` (`HTTP/1.1` with `JSON` content type). +## Default protocol +The default communication protocol is now `HTTP2_JSON` (`HTTP/2` with `JSON` content type). ## Transitive dependencies -A transitive dependency on `org.apache.httpcomponents:httpclient:4.5.x` has been added and the dependency -on `com.arangodb:velocypack` has been removed. -The dependency on `org.apache.httpcomponents:httpclient` can be excluded when using `VST` communication protocol only. -When using `VST` or `HTTP_VPACK`, the optional dependency on `com.arangodb:jackson-dataformat-velocypack` must be -provided. -When using `HTTP_JSON` (default), no dependencies on `VPACK` libraries are required. +A transitive dependency on `io.vertx:vertx-web-client` has been added. In can be excluded when using `VST` protocol +only. +The dependency on `com.arangodb:velocypack` has been removed. +When using protocol `VST`, `HTTP_VPACK` or `HTTP2_VPACK`, the optional dependency +on `com.arangodb:jackson-dataformat-velocypack` +must be provided. +When using protocol `HTTP_JSON` or `HTTP2_JSON` (default), no dependencies on `VPACK` libraries are required. Transitive dependencies on Jackson Core, Databind and Annotations have been added, using by default version `2.13`. The versions of such libraries can be overridden, the driver is compatible with Jackson versions: `2.10`, `2.11`, `2.12` , `2.13`. - ## User Data Types Before version `7.0` the driver always parsed raw strings as JSON, but unfortunately this does not allow distinguishing @@ -27,8 +29,8 @@ interpreted as JSON anymore. To represent user data as raw JSON, the wrapper cla added. To represent user data already encoded as byte array, the wrapper class `com.arangodb.util.RawBytes` has been added. -The byte array can either represent a `JSON` string (UTF-8 encoded) or a `VPACK` value, but the encoding must be the -same used for the driver protocol configuration (`JSON` for `HTTP_JSON`, `VPACK` otherwise). +The byte array can either represent a `JSON` string (UTF-8 encoded) or a `VPACK` value, but the encoding must be the +same used for the driver protocol configuration (`JSON` for `HTTP_JSON` and `HTTP2_JSON`, `VPACK` otherwise). `BaseDocument` and `BaseEdgeDocument` are now `final`, they have a new method `removeAttribute(String)` and `getProperties()` returns now an unmodifiable map. @@ -38,13 +40,14 @@ metadata received in the response. Since version `7.0`, the input data objects p treated as immutable and the related metadata fields are not updated anymore. The updated metadata can still be found in the object returned by the API method. - ## Serialization The serialization module has been changed and is now based on the Jackson API. -Up to version 6, the (de)serialization was always performed to/from `VPACK`. In case the JSON representation was required, -the raw `VPACK` was then converted to `JSON`. Since version 7, the serialization module is a dataformat agnostic API, based +Up to version 6, the (de)serialization was always performed to/from `VPACK`. In case the JSON representation was +required, +the raw `VPACK` was then converted to `JSON`. Since version 7, the serialization module is a dataformat agnostic API, +based on the Jackson API. By default, it reads and writes `JSON` format. `VPACK` support is provided by the optional dependency `com.arangodb:jackson-dataformat-velocypack`, which is a dataformat backend implementation for Jackson. @@ -62,23 +65,24 @@ the [tests](../src/test/java/com/arangodb/serde/JsonbSerdeImpl.java). Independently of the user data serializer, the following data types are (de)serialized with specific handlers (not customizable): + - `JsonNode` and its children (`ArrayNode`, `ObjectNode`, ...) - `RawJson` - `RawBytes` - `BaseDocument` - `BaseEdgeDocument` - ## Removed APIs The following client APIs have been removed: + - client APIs already deprecated in Java Driver version `6.19.0` - client API to interact with deprecated server APIs: - - `MMFiles` related APIs - - `ArangoDatabase.executeTraversal()` - - `ArangoDB.getLogs()` - - `minReplicationFactor` in collections and graphs - - `overwrite` flag in `DocumentCreateOptions` + - `MMFiles` related APIs + - `ArangoDatabase.executeTraversal()` + - `ArangoDB.getLogs()` + - `minReplicationFactor` in collections and graphs + - `overwrite` flag in `DocumentCreateOptions` The deprecation notes in the related javadoc contain information about the reason of the deprecation and suggest migration alternatives to use. @@ -87,23 +91,27 @@ To migrate your existing project to Java Driver version `7.0`, it is recommended make sure that your code does not use any deprecated API. This can be done by checking the presence of deprecation warnings in the Java compiler output. -The user data custom serializer implementation `com.arangodb.mapping.ArangoJack` has been removed in favor of `com.arangodb.serde.JacksonSerde`. +The user data custom serializer implementation `com.arangodb.mapping.ArangoJack` has been removed in favor +of `com.arangodb.serde.JacksonSerde`. Support for interpreting raw strings as JSON has been removed (in favor of `com.arangodb.util.RawJson`). -Support of data type `com.arangodb.velocypack.VPackSlice` has been removed (in favor of Jackson types: `JsonNode`, `ArrayNode`, `ObjectNode`, ...). +Support of data type `com.arangodb.velocypack.VPackSlice` has been removed (in favor of Jackson types: `JsonNode` +, `ArrayNode`, `ObjectNode`, ...). +Support for custom initialization of +cursors (`ArangoDB._setCursorInitializer(ArangoCursorInitializer cursorInitializer)`) has been removed. ## API methods changes -Before version `7.0` some CRUD API methods inferred the return type from the type of the data object passed as input. Now the return type can be explicitly set for each CRUD API method. +Before version `7.0` some CRUD API methods inferred the return type from the type of the data object passed as input. +Now the return type can be explicitly set for each CRUD API method. CRUD operations operating with multiple documents have now an overloaded variant which accepts raw data (`RawBytes` and `RawJson`) containing multiple documents. `com.arangodb.ArangoCursor#getStats()` returns now an untyped map. - ## API entities All entities and options classes are now `final`. diff --git a/driver/ChangeLog.md b/driver/ChangeLog.md index 0b27cc0df..f87ac868a 100644 --- a/driver/ChangeLog.md +++ b/driver/ChangeLog.md @@ -10,10 +10,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ### Changed -- changed default communication protocol from VST to HTTP/1.1 -- changed default content-type encoding format from VPACK to JSON -- transitive dependency on `org.apache.httpcomponents:httpclient:4.5.x` is not optional anymore, but it can be excluded - if using VST only +- changed http client library to Vert.x WebClient +- changed default communication protocol from `VST` to `HTTP/2` +- changed default content-type encoding format from `VPACK` to `JSON` - VPACK support is now provided by the optional dependency `com.arangodb:jackson-dataformat-velocypack` as dataformat backend for Jackson - changed serialization module, which is now based on Jackson API @@ -44,9 +43,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - `ArangoDB.getLogs()` - `minReplicationFactor` in collections and graphs - `overwrite` flag in `DocumentCreateOptions` +- removed `com.arangodb.util.ArangoCursorInitializer` ### Added +- added support to `HTTP/2` communication protocol +- added transitive dependency on `io.vertx:vertx-web-client`, which can be excluded if using VST only - added transitive dependency on Jackson Core, Databind and Annotations - added wrapper class for raw JSON content (`com.arangodb.util.RawJson`) - added wrapper class for content already encoded as byte array (`com.arangodb.util.RawBytes`) From 9100c07d789aef6a54abc7261dc313d61a8794b9 Mon Sep 17 00:00:00 2001 From: Michele Rastelli Date: Thu, 10 Nov 2022 13:53:09 +0100 Subject: [PATCH 2/4] ArangoDB.execute --- docs/v7_detailed_changes.md | 7 ++++++- driver/ChangeLog.md | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/v7_detailed_changes.md b/docs/v7_detailed_changes.md index 8ca1cf517..bb01a272f 100644 --- a/docs/v7_detailed_changes.md +++ b/docs/v7_detailed_changes.md @@ -4,9 +4,10 @@ The HTTP client has been changed to Vert.x WebClient. `HTTP/2` is now supported. -## Default protocol +## Configuration changes The default communication protocol is now `HTTP2_JSON` (`HTTP/2` with `JSON` content type). +The default host configuration to `127.0.0.1:8529` has been removed. ## Transitive dependencies @@ -112,6 +113,10 @@ and `RawJson`) containing multiple documents. `com.arangodb.ArangoCursor#getStats()` returns now an untyped map. +`Request` and `Response` classes have been refactored to support generic body +type. `ArangoDB.execute(Request, Class): Response` accepts now the target deserialization type for the response +body. + ## API entities All entities and options classes are now `final`. diff --git a/driver/ChangeLog.md b/driver/ChangeLog.md index f87ac868a..c01989fb3 100644 --- a/driver/ChangeLog.md +++ b/driver/ChangeLog.md @@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ### Changed +- `ArangoDB.execute()` accepts now target deserialization type +- `Request` and `Response` support now generic body type +- removed default host configuration to `127.0.0.1:8529` - changed http client library to Vert.x WebClient - changed default communication protocol from `VST` to `HTTP/2` - changed default content-type encoding format from `VPACK` to `JSON` From 132223b3837cffd209a29fd12dcd672e2998fa2e Mon Sep 17 00:00:00 2001 From: Michele Rastelli Date: Thu, 10 Nov 2022 14:20:18 +0100 Subject: [PATCH 3/4] ConfigPropertiesProvider --- docs/v7_detailed_changes.md | 13 +++++++++++-- driver/ChangeLog.md | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/v7_detailed_changes.md b/docs/v7_detailed_changes.md index bb01a272f..259cc29dc 100644 --- a/docs/v7_detailed_changes.md +++ b/docs/v7_detailed_changes.md @@ -2,12 +2,19 @@ ## HTTP client -The HTTP client has been changed to Vert.x WebClient. `HTTP/2` is now supported. +The HTTP client has been changed to Vert.x WebClient. `HTTP/2` is now supported. `HTTP/2` supports multiplexing and uses +by default `1` connection per host. ## Configuration changes The default communication protocol is now `HTTP2_JSON` (`HTTP/2` with `JSON` content type). -The default host configuration to `127.0.0.1:8529` has been removed. +The default host configuration to `127.0.0.1:8529` has been removed. +Configuration properties are not read automatically from properties files anymore. +A new configuration option for loading properties has been +introduced: `com.arangodb.ArangoDB.Builder.loadProperties(ConfigPropertiesProvider)`, based on a interface. +Implementations could supply configuration properties coming from different sources, eg. system properties, remote +stores, frameworks facilities, etc. An implementation for loading properties from local files is provided +by `com.arangodb.internal.config.FileConfigPropertiesProvider`. ## Transitive dependencies @@ -117,6 +124,8 @@ and `RawJson`) containing multiple documents. type. `ArangoDB.execute(Request, Class): Response` accepts now the target deserialization type for the response body. +`ArangoDBException` has been enhanced with the id of the request causing it. + ## API entities All entities and options classes are now `final`. diff --git a/driver/ChangeLog.md b/driver/ChangeLog.md index c01989fb3..a26e8d54e 100644 --- a/driver/ChangeLog.md +++ b/driver/ChangeLog.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ### Changed +- configuration properties from local files are not read automatically anymore, but can be configured + with `ConfigPropertiesProvider` - `ArangoDB.execute()` accepts now target deserialization type - `Request` and `Response` support now generic body type - removed default host configuration to `127.0.0.1:8529` @@ -50,6 +52,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ### Added +- `com.arangodb.ArangoDB.Builder.loadProperties(ConfigPropertiesProvider)` to register custom configuration providers - added support to `HTTP/2` communication protocol - added transitive dependency on `io.vertx:vertx-web-client`, which can be excluded if using VST only - added transitive dependency on Jackson Core, Databind and Annotations @@ -63,6 +66,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - added overloaded methods for CRUD operations allowing specifying the return type - added API to support CRUD operations from raw data (`RawBytes` and `RawJson`) containing multiple documents - added `BaseDocument#removeAttribute(String)` and `BaseEdgeDocument#removeAttribute(String)` +- added request id to `ArangoDBException` ### Fixed From 7ae4a447ba78c660858a7122ecd8581d4156511e Mon Sep 17 00:00:00 2001 From: Michele Rastelli Date: Thu, 10 Nov 2022 14:42:18 +0100 Subject: [PATCH 4/4] docs upd --- driver/ChangeLog.md => ChangeLog.md | 33 ++++++------ README.md | 2 +- docs/v7_detailed_changes.md | 83 +++++++++++++++-------------- 3 files changed, 60 insertions(+), 58 deletions(-) rename driver/ChangeLog.md => ChangeLog.md (97%) diff --git a/driver/ChangeLog.md b/ChangeLog.md similarity index 97% rename from driver/ChangeLog.md rename to ChangeLog.md index a26e8d54e..2bcbc63d2 100644 --- a/driver/ChangeLog.md +++ b/ChangeLog.md @@ -10,8 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ### Changed -- configuration properties from local files are not read automatically anymore, but can be configured - with `ConfigPropertiesProvider` +- configuration properties from local files are not read automatically anymore - `ArangoDB.execute()` accepts now target deserialization type - `Request` and `Response` support now generic body type - removed default host configuration to `127.0.0.1:8529` @@ -24,8 +23,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - data objects passed as arguments to API methods are now treated as immutable and the related metadata fields are not updated anymore (updated metadata can be found anyway in the object returned by the API method) - changed some API signatures which were using unnecessary generics -- changed `com.arangodb.ArangoCursor#getStats()` to return untyped map -- modeled replication factor with a new interface (`com.arangodb.entity.ReplicationFactor`) with +- changed `ArangoCursor#getStats()` to return untyped map +- modeled replication factor with a new interface (`ReplicationFactor`) with implementations: `NumericReplicationFactor` and `SatelliteReplicationFactor` - all data definition classes are now `final` - `BaseDocument` and `BaseEdgeDocument` are now `final` @@ -35,12 +34,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ### Removed -- removed user data custom serializer API based on `com.arangodb.util.ArangoSerialization` (in favor - of `com.arangodb.serde.ArangoSerde`) -- removed user data custom serializer implementation `com.arangodb.mapping.ArangoJack` (in favor - of `com.arangodb.serde.JacksonSerde`) -- removed support for interpreting raw strings as JSON (in favor of `com.arangodb.util.RawJson`) -- removed support of data type `com.arangodb.velocypack.VPackSlice` (in favor of Jackson types: `JsonNode`, `ArrayNode`, `ObjectNode`, ...) +- removed user data custom serializer API based on `ArangoSerialization` (in favor of `ArangoSerde`) +- removed user data custom serializer implementation `ArangoJack` (in favor of `JacksonSerde`) +- removed support for interpreting raw strings as JSON (in favor of `RawJson`) +- removed support of data type `VPackSlice` (in favor of Jackson types: `JsonNode`, `ArrayNode`, `ObjectNode`, ...) - removed client APIs already deprecated in Java Driver version `6.19.0` - removed deprecated server APIs: - `MMFiles` related APIs @@ -48,20 +45,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - `ArangoDB.getLogs()` - `minReplicationFactor` in collections and graphs - `overwrite` flag in `DocumentCreateOptions` -- removed `com.arangodb.util.ArangoCursorInitializer` +- removed `ArangoCursorInitializer` ### Added -- `com.arangodb.ArangoDB.Builder.loadProperties(ConfigPropertiesProvider)` to register custom configuration providers +- added `ArangoDB.Builder.loadProperties(ConfigPropertiesProvider)` to register custom configuration providers +- added `FileConfigPropertiesProvider` to load properties from local files - added support to `HTTP/2` communication protocol - added transitive dependency on `io.vertx:vertx-web-client`, which can be excluded if using VST only - added transitive dependency on Jackson Core, Databind and Annotations -- added wrapper class for raw JSON content (`com.arangodb.util.RawJson`) -- added wrapper class for content already encoded as byte array (`com.arangodb.util.RawBytes`) +- added wrapper class for raw JSON content (`RawJson`) +- added wrapper class for content already encoded as byte array (`RawBytes`) - added support for Jackson types (`JsonNode`, `ArrayNode`, `ObjectNode`, ...) - added support for Jackson annotations in data types -- added new user data custom serializer API based on `com.arangodb.serde.ArangoSerde` -- added new user data custom serializer implementation based on Jackson (`com.arangodb.serde.JacksonSerde`) +- added new user data custom serializer API based on `ArangoSerde` +- added new user data custom serializer implementation based on Jackson (`JacksonSerde`) - added methods and parameters targets to meta binding annotations - added overloaded methods for CRUD operations allowing specifying the return type - added API to support CRUD operations from raw data (`RawBytes` and `RawJson`) containing multiple documents @@ -72,8 +70,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - removed `--allow-incomplete-classpath` from native image configuration (#397) - ability to control whether `null` values are included in the serialization (#389) -- added support to `com.arangodb.model.DocumentCreateOptions#keepNull` (#374) +- added support to `DocumentCreateOptions#keepNull` (#374) - allow specifying the return type on insertDocuments (#373) +- removed credentials logging (#410) ## [6.19.0] diff --git a/README.md b/README.md index d50d4ec1d..843d4e3e1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The official [ArangoDB](https://www.arangodb.com/) Java Driver. ## Learn more -- [ChangeLog](driver/ChangeLog.md) +- [ChangeLog](ChangeLog.md) - [Examples](driver/src/test/java/com/arangodb/example) - [Examples Async](driver/src/test/java/com/arangodb/async/example) - [Tutorial](https://www.arangodb.com/docs/stable/drivers/java-tutorial.html) diff --git a/docs/v7_detailed_changes.md b/docs/v7_detailed_changes.md index 259cc29dc..f63fc6578 100644 --- a/docs/v7_detailed_changes.md +++ b/docs/v7_detailed_changes.md @@ -3,28 +3,33 @@ ## HTTP client The HTTP client has been changed to Vert.x WebClient. `HTTP/2` is now supported. `HTTP/2` supports multiplexing and uses -by default `1` connection per host. +`1` connection per host by default. ## Configuration changes The default communication protocol is now `HTTP2_JSON` (`HTTP/2` with `JSON` content type). + The default host configuration to `127.0.0.1:8529` has been removed. + Configuration properties are not read automatically from properties files anymore. + A new configuration option for loading properties has been -introduced: `com.arangodb.ArangoDB.Builder.loadProperties(ConfigPropertiesProvider)`, based on a interface. -Implementations could supply configuration properties coming from different sources, eg. system properties, remote -stores, frameworks facilities, etc. An implementation for loading properties from local files is provided -by `com.arangodb.internal.config.FileConfigPropertiesProvider`. +introduced: `ArangoDB.Builder.loadProperties(ConfigPropertiesProvider)`. Implementations could supply configuration +properties coming from different sources, eg. system properties, remote stores, frameworks facilities, etc. An +implementation for loading properties from local files is provided by `FileConfigPropertiesProvider`. ## Transitive dependencies A transitive dependency on `io.vertx:vertx-web-client` has been added. In can be excluded when using `VST` protocol only. + The dependency on `com.arangodb:velocypack` has been removed. + When using protocol `VST`, `HTTP_VPACK` or `HTTP2_VPACK`, the optional dependency -on `com.arangodb:jackson-dataformat-velocypack` -must be provided. +on `com.arangodb:jackson-dataformat-velocypack` must be provided. + When using protocol `HTTP_JSON` or `HTTP2_JSON` (default), no dependencies on `VPACK` libraries are required. + Transitive dependencies on Jackson Core, Databind and Annotations have been added, using by default version `2.13`. The versions of such libraries can be overridden, the driver is compatible with Jackson versions: `2.10`, `2.11`, `2.12` , `2.13`. @@ -33,10 +38,9 @@ The versions of such libraries can be overridden, the driver is compatible with Before version `7.0` the driver always parsed raw strings as JSON, but unfortunately this does not allow distinguishing the case when the intent is to use the raw string as such, without parsing it. Since version `7.0`, strings are not -interpreted as JSON anymore. To represent user data as raw JSON, the wrapper class `com.arangodb.util.RawJson` has been -added. +interpreted as JSON anymore. To represent user data as raw JSON, the wrapper class `RawJson` has been added. -To represent user data already encoded as byte array, the wrapper class `com.arangodb.util.RawBytes` has been added. +To represent user data already encoded as byte array, the wrapper class `RawBytes` has been added. The byte array can either represent a `JSON` string (UTF-8 encoded) or a `VPACK` value, but the encoding must be the same used for the driver protocol configuration (`JSON` for `HTTP_JSON` and `HTTP2_JSON`, `VPACK` otherwise). @@ -53,22 +57,20 @@ the object returned by the API method. The serialization module has been changed and is now based on the Jackson API. Up to version 6, the (de)serialization was always performed to/from `VPACK`. In case the JSON representation was -required, -the raw `VPACK` was then converted to `JSON`. Since version 7, the serialization module is a dataformat agnostic API, -based -on the Jackson API. By default, it reads and writes `JSON` format. `VPACK` support is provided by the optional -dependency `com.arangodb:jackson-dataformat-velocypack`, which is a dataformat backend implementation for Jackson. - -The (de)serialization of user data can be customized by registering an implementation -of `com.arangodb.serde.ArangoSerde` via `com.arangodb.ArangoDB.Builder#serializer()`. -The default user data serializer is `com.arangodb.serde.JacksonSerde`, which is based on Jackson API and is available -for both `JSON` and `VPACK`. It (de)serializes user data using Jackson Databind and can handle Jackson Annotations. -It can be customized through `com.arangodb.serde.JacksonSerde#configure(Consumer)`, -i.e. registering Kotlin or Scala modules. Furthermore, meta binding annotations (`@Id`, `@Key`, `@Rev`, `@From`, `@To`) -are supported for mapping documents and edges metadata fields (`_id`, `_key`, `_rev`, `_from`, `_to`). - -`com.arangodb.serde.ArangoSerde` interface is not constrained to Jackson. It is instead an abstract API that can be -implemented using any custom serialization library, e.g. an example of `JSON-B` implementation can be found in +required, the raw `VPACK` was then converted to `JSON`. Since version 7, the serialization module is a dataformat +agnostic API, based on the Jackson API. By default, it reads and writes `JSON` format. `VPACK` support is provided by +the optional dependency `com.arangodb:jackson-dataformat-velocypack`, which is a dataformat backend implementation for +Jackson. + +The (de)serialization of user data can be customized by registering an implementation of `ArangoSerde` +via `ArangoDB.Builder#serializer()`. The default user data serializer is `JacksonSerde`, which is based on Jackson API +and is available for both `JSON` and `VPACK`. It (de)serializes user data using Jackson Databind and can handle Jackson +Annotations. It can be customized through `JacksonSerde#configure(Consumer)`, i.e. registering Kotlin or +Scala modules. Furthermore, meta binding annotations (`@Id`, `@Key`, `@Rev`, `@From`, `@To`) are supported for mapping +documents and edges metadata fields (`_id`, `_key`, `_rev`, `_from`, `_to`). + +`ArangoSerde` interface is not constrained to Jackson. It is instead an abstract API that can be implemented using any +custom serialization library, e.g. an example of `JSON-B` implementation can be found in the [tests](../src/test/java/com/arangodb/serde/JsonbSerdeImpl.java). Independently of the user data serializer, the following data types are (de)serialized with specific handlers (not @@ -92,20 +94,12 @@ The following client APIs have been removed: - `minReplicationFactor` in collections and graphs - `overwrite` flag in `DocumentCreateOptions` -The deprecation notes in the related javadoc contain information about the reason of the deprecation and suggest -migration alternatives to use. - -To migrate your existing project to Java Driver version `7.0`, it is recommended updating to version `6.19` first and -make sure that your code does not use any deprecated API. This can be done by checking the presence of deprecation -warnings in the Java compiler output. - -The user data custom serializer implementation `com.arangodb.mapping.ArangoJack` has been removed in favor -of `com.arangodb.serde.JacksonSerde`. +The user data custom serializer implementation `ArangoJack` has been removed in favor of `JacksonSerde`. -Support for interpreting raw strings as JSON has been removed (in favor of `com.arangodb.util.RawJson`). +Support for interpreting raw strings as JSON has been removed (in favor of `RawJson`). -Support of data type `com.arangodb.velocypack.VPackSlice` has been removed (in favor of Jackson types: `JsonNode` -, `ArrayNode`, `ObjectNode`, ...). +Support of data type `VPackSlice` has been removed (in favor of Jackson types: `JsonNode`, `ArrayNode`, `ObjectNode`, +...). Support for custom initialization of cursors (`ArangoDB._setCursorInitializer(ArangoCursorInitializer cursorInitializer)`) has been removed. @@ -118,7 +112,7 @@ Now the return type can be explicitly set for each CRUD API method. CRUD operations operating with multiple documents have now an overloaded variant which accepts raw data (`RawBytes` and `RawJson`) containing multiple documents. -`com.arangodb.ArangoCursor#getStats()` returns now an untyped map. +`ArangoCursor#getStats()` returns now an untyped map. `Request` and `Response` classes have been refactored to support generic body type. `ArangoDB.execute(Request, Class): Response` accepts now the target deserialization type for the response @@ -130,5 +124,14 @@ body. All entities and options classes are now `final`. -The replication factor is now modeled with a new interface (`com.arangodb.entity.ReplicationFactor`) with +The replication factor is now modeled with a new interface (`ReplicationFactor`) with implementations: `NumericReplicationFactor` and `SatelliteReplicationFactor`. + +## Migration + +To migrate your existing project to Java Driver version `7.0`, it is recommended updating to version `6.19` first and +make sure that your code does not use any deprecated API. This can be done by checking the presence of deprecation +warnings in the Java compiler output. + +The deprecation notes in the related javadoc contain information about the reason of the deprecation and suggest +migration alternatives to use.