Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7080d53
new serializer API
rashtao Jun 28, 2022
fa45985
serde InternalModule
rashtao Jun 29, 2022
f1ac12a
serde serialization refactoring
rashtao Jun 29, 2022
638baf4
serde serialization refactoring: graph API
rashtao Jun 29, 2022
1b2aff6
serde serialization refactoring: collections API
rashtao Jun 29, 2022
a069170
serde serialization refactoring: vertex collection API
rashtao Jun 30, 2022
6f8e892
serde serialization refactoring: ArangoSearch API
rashtao Jun 30, 2022
5afdba0
SerdeUtils
rashtao Jun 30, 2022
dcc54e6
serde serialization refactoring: View API
rashtao Jun 30, 2022
508393c
serde serialization refactoring: ArangoJack
rashtao Jul 1, 2022
3fe5e55
serde serialization refactoring: Collection API
rashtao Jul 1, 2022
663afe6
JacksonSerde configuration
rashtao Jul 1, 2022
59e861d
VPackSlice serializer
rashtao Jul 1, 2022
9a6d67a
serde serialization refactoring: Transactions API
rashtao Jul 1, 2022
c496c86
serde serialization refactoring: Cursor API
rashtao Jul 1, 2022
77b1f93
ReplicationFactor refactoring
rashtao Jul 5, 2022
6a161fe
ArangoSerializer refactoring
rashtao Jul 5, 2022
c146f38
removed old ArangoSerialization
rashtao Jul 5, 2022
4fc2aa7
refctored communication API using byte[] instead of VPackSlice for ou…
rashtao Jul 6, 2022
93d5d43
serialize AQL bindvars as byte[]
rashtao Jul 8, 2022
055d266
separated ArangoSerialization from InternalSerialization
rashtao Jul 8, 2022
d0bc5d4
deserializer refactoring
rashtao Jul 8, 2022
1f15b43
deserializer refactoring: ArangoSearch
rashtao Jul 11, 2022
2b92050
deserializer refactoring: Collections API
rashtao Jul 12, 2022
e570506
deserializer refactoring: Database API
rashtao Jul 12, 2022
a5b2c49
deserializer refactoring: test fixes
rashtao Jul 12, 2022
2ff9f33
removed usages of VPackSlice
rashtao Jul 12, 2022
013ca0e
removed velocypack related code
rashtao Jul 12, 2022
eceb7a7
reviewed API changes in entity and model packages
rashtao Jul 19, 2022
270e54f
remove dependencies on com.arangodb.velocypack
rashtao Jul 19, 2022
abd5b25
remove test dependencies on com.arangodb.velocypack
rashtao Jul 20, 2022
5f5f323
removed old serialization classes
rashtao Jul 20, 2022
9d9e46d
made data definition classes final
rashtao Jul 21, 2022
567988f
removed VPackSlice from javadoc
rashtao Jul 21, 2022
02f3de4
simplified serde API
rashtao Jul 21, 2022
a61f84e
removed CursorEntity from public API
rashtao Jul 22, 2022
d71a14e
RawJson and RawBytes
rashtao Jul 22, 2022
cabc5a8
refactoring: user serde inside internal serde
rashtao Jul 22, 2022
e69fa80
removed support for raw json strings in favor of RawJson and RawBytes…
rashtao Jul 22, 2022
1b34f41
@UserData and @UserDataInside annotations
rashtao Jul 25, 2022
4eb2886
@UserData and @UserDataInside deserialization
rashtao Jul 26, 2022
a567a65
fix cluster tests
rashtao Jul 26, 2022
453a38e
replaced model arrays with collections
rashtao Jul 27, 2022
8707361
native image support
rashtao Jul 27, 2022
18a3e8d
removed VPack tests
rashtao Jul 28, 2022
f32d1b6
removed dep on velocypack
rashtao Jul 28, 2022
c00dc6f
implemented MapperProvider to isolate references to optional VPackMapper
rashtao Jul 28, 2022
949022a
serialize/deserialize JsonNode with internal serde
rashtao Jul 28, 2022
fd3d5fb
date serde tests
rashtao Jul 28, 2022
99ff26d
test with different jackson versions
rashtao Jul 28, 2022
40c2c59
JSON-B serde
rashtao Jul 29, 2022
88367ec
fixed native tests
rashtao Aug 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 43 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,46 @@ jobs:
run: mvn -version
- name: Test
run: mvn --no-transfer-progress test -DargLine="-Duser.language=${{matrix.user-language}}"

jackson-test:
timeout-minutes: 20
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
jackson-version:
- 2.13.3
- 2.12.7
- 2.11.4
- 2.10.5
docker-img:
- docker.io/arangodb/arangodb:3.9.1
topology:
- single
db-ext-names:
- false
java-version:
- 17
user-language:
- en

steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{matrix.java-version}}
distribution: 'adopt'
cache: maven
- name: Start Database
run: ./docker/start_db.sh
env:
ARANGO_LICENSE_KEY: ${{ secrets.ARANGO_LICENSE_KEY }}
STARTER_MODE: ${{matrix.topology}}
DOCKER_IMAGE: ${{matrix.docker-img}}
DATABASE_EXTENDED_NAMES: ${{matrix.db-ext-names}}
- name: Info
run: mvn -version
- name: Test
run: mvn --no-transfer-progress test -Djackson.version=${{jackson-version}}
43 changes: 33 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson.version>2.13.3</jackson.version>
</properties>

<developers>
Expand Down Expand Up @@ -89,7 +90,7 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.11</version>
<version>0.9.13</version>
<extensions>true</extensions>
<executions>
<execution>
Expand All @@ -102,6 +103,7 @@
</execution>
</executions>
<configuration>
<quickBuild>true</quickBuild>
<skip>false</skip>
<buildArgs>
<buildArg>--no-fallback</buildArg>
Expand Down Expand Up @@ -233,10 +235,6 @@
</build>

<dependencies>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>velocypack</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand All @@ -245,11 +243,28 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>jackson-dataformat-velocypack</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down Expand Up @@ -288,10 +303,23 @@
<version>22.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>yasson</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>jackson-dataformat-velocypack</artifactId>
Expand All @@ -317,11 +345,6 @@
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>velocypack</artifactId>
<version>2.5.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
42 changes: 21 additions & 21 deletions src/main/java/com/arangodb/ArangoCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @see <a href="https://www.arangodb.com/docs/stable/http/collection.html">Documents API Documentation</a>
*/
@SuppressWarnings("UnusedReturnValue")
public interface ArangoCollection extends ArangoSerializationAccessor {
public interface ArangoCollection extends ArangoSerdeAccessor {

/**
* The the handler of the database the collection is within
Expand All @@ -55,7 +55,7 @@ public interface ArangoCollection extends ArangoSerializationAccessor {
* Creates a new document from the given document, unless there is already a document with the _key given. If no
* _key is given, a new unique _key is generated automatically.
*
* @param value A representation of a single document (POJO, VPackSlice or String for JSON)
* @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return information about the document
* @throws ArangoDBException
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#create-document">API
Expand All @@ -67,7 +67,7 @@ public interface ArangoCollection extends ArangoSerializationAccessor {
* Creates a new document from the given document, unless there is already a document with the _key given. If no
* _key is given, a new unique _key is generated automatically.
*
* @param value A representation of a single document (POJO, VPackSlice or String for JSON)
* @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return information about the document
* @throws ArangoDBException
Expand All @@ -83,7 +83,7 @@ public interface ArangoCollection extends ArangoSerializationAccessor {
* Limitations:
* - the fields having {@code null} value are always removed during serialization
*
* @param values A List of documents (POJO, VPackSlice or String for JSON)
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return information about the documents
* @throws ArangoDBException
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#create-document">API
Expand All @@ -98,7 +98,7 @@ public interface ArangoCollection extends ArangoSerializationAccessor {
* Limitations:
* - the fields having {@code null} value are always removed during serialization
*
* @param values A List of documents (POJO, VPackSlice or String for JSON)
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return information about the documents
* @throws ArangoDBException
Expand Down Expand Up @@ -162,7 +162,7 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
* Retrieves the document with the given {@code key} from the collection.
*
* @param key The key of the document
* @param type The type of the document (POJO class, VPackSlice or String for JSON)
* @param type The type of the document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return the document identified by the key
* @throws ArangoDBException
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#read-document">API
Expand All @@ -174,7 +174,7 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
* Retrieves the document with the given {@code key} from the collection.
*
* @param key The key of the document
* @param type The type of the document (POJO class, VPackSlice or String for JSON)
* @param type The type of the document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return the document identified by the key
* @throws ArangoDBException
Expand All @@ -187,7 +187,7 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
* Retrieves multiple documents with the given {@code _key} from the collection.
*
* @param keys The keys of the documents
* @param type The type of the documents (POJO class, VPackSlice or String for JSON)
* @param type The type of the documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return the documents and possible errors
* @throws ArangoDBException
*/
Expand All @@ -197,7 +197,7 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
* Retrieves multiple documents with the given {@code _key} from the collection.
*
* @param keys The keys of the documents
* @param type The type of the documents (POJO class, VPackSlice or String for JSON)
* @param type The type of the documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return the documents and possible errors
* @throws ArangoDBException
Expand All @@ -210,7 +210,7 @@ <T> MultiDocumentEntity<T> getDocuments(Collection<String> keys, Class<T> type,
* precondition is violated
*
* @param key The key of the document
* @param value A representation of a single document (POJO, VPackSlice or String for JSON)
* @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return information about the document
* @throws ArangoDBException
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#replace-document">API
Expand All @@ -223,7 +223,7 @@ <T> MultiDocumentEntity<T> getDocuments(Collection<String> keys, Class<T> type,
* precondition is violated
*
* @param key The key of the document
* @param value A representation of a single document (POJO, VPackSlice or String for JSON)
* @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return information about the document
* @throws ArangoDBException
Expand All @@ -240,7 +240,7 @@ <T> DocumentUpdateEntity<T> replaceDocument(String key, T value, DocumentReplace
* Limitations:
* - the fields having {@code null} value are always removed during serialization
*
* @param values A List of documents (POJO, VPackSlice or String for JSON)
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return information about the documents
* @throws ArangoDBException
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#replace-documents">API
Expand All @@ -255,7 +255,7 @@ <T> DocumentUpdateEntity<T> replaceDocument(String key, T value, DocumentReplace
* Limitations:
* - the fields having {@code null} value are always removed during serialization
*
* @param values A List of documents (POJO, VPackSlice or String for JSON)
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return information about the documents
* @throws ArangoDBException
Expand All @@ -271,7 +271,7 @@ <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(
* they do not yet exist, and overwritten in the existing document if they do exist there.
*
* @param key The key of the document
* @param value A representation of a single document (POJO, VPackSlice or String for JSON)
* @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return information about the document
* @throws ArangoDBException
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#update-document">API
Expand All @@ -285,7 +285,7 @@ <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(
* they do not yet exist, and overwritten in the existing document if they do exist there.
*
* @param key The key of the document
* @param value A representation of a single document (POJO, VPackSlice or String for JSON)
* @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return information about the document
* @throws ArangoDBException
Expand All @@ -301,7 +301,7 @@ <T> DocumentUpdateEntity<T> updateDocument(String key, T value, DocumentUpdateOp
* they do not yet exist, and overwritten in the existing document if they do exist there.
*
* @param key The key of the document
* @param value A representation of a single document (POJO, VPackSlice or String for JSON)
* @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @param returnType Type of the returned newDocument and/or oldDocument
* @return information about the document
Expand All @@ -318,7 +318,7 @@ <T, U> DocumentUpdateEntity<U> updateDocument(String key, T value, DocumentUpdat
* attributes from the patch documents will be added to the existing documents if they do not yet exist, and
* overwritten in the existing documents if they do exist there.
*
* @param values A list of documents (POJO, VPackSlice or String for JSON)
* @param values A list of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @return information about the documents
* @throws ArangoDBException
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#update-documents">API
Expand All @@ -332,7 +332,7 @@ <T, U> DocumentUpdateEntity<U> updateDocument(String key, T value, DocumentUpdat
* attributes from the patch documents will be added to the existing documents if they do not yet exist, and
* overwritten in the existing documents if they do exist there.
*
* @param values A list of documents (POJO, VPackSlice or String for JSON)
* @param values A list of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @return information about the documents
* @throws ArangoDBException
Expand All @@ -348,7 +348,7 @@ <T> MultiDocumentEntity<DocumentUpdateEntity<T>> updateDocuments(
* attributes from the patch documents will be added to the existing documents if they do not yet exist, and
* overwritten in the existing documents if they do exist there.
*
* @param values A list of documents (POJO, VPackSlice or String for JSON)
* @param values A list of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
* @param options Additional options, can be null
* @param returnType Type of the returned newDocument and/or oldDocument
* @return information about the documents
Expand All @@ -374,7 +374,7 @@ <T, U> MultiDocumentEntity<DocumentUpdateEntity<U>> updateDocuments(
* Deletes the document with the given {@code key} from the collection.
*
* @param key The key of the document
* @param type The type of the document (POJO class, VPackSlice or String for JSON). Only necessary if
* @param type The type of the document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes}). Only necessary if
* options.returnOld is set to true, otherwise can be null.
* @param options Additional options, can be null
* @return information about the document
Expand All @@ -401,7 +401,7 @@ <T> DocumentDeleteEntity<T> deleteDocument(String key, Class<T> type, DocumentDe
* Deletes multiple documents from the collection.
*
* @param values The keys of the documents or the documents themselves
* @param type The type of the documents (POJO class, VPackSlice or String for JSON). Only necessary if
* @param type The type of the documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes}). Only necessary if
* options.returnOld is set to true, otherwise can be null.
* @param options Additional options, can be null
* @return information about the documents
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/arangodb/ArangoCursor.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

package com.arangodb;

import com.arangodb.entity.CursorEntity.Stats;
import com.arangodb.entity.CursorEntity.Warning;
import com.arangodb.entity.CursorStats;
import com.arangodb.entity.CursorWarning;

import java.io.Closeable;
import java.util.Collection;
Expand Down Expand Up @@ -53,12 +53,12 @@ public interface ArangoCursor<T> extends ArangoIterable<T>, ArangoIterator<T>, C
* number of modified documents and the number of documents that could not be modified due to an error (if
* ignoreErrors query option is specified)
*/
Stats getStats();
CursorStats getStats();

/**
* @return warnings which the query could have been produced
*/
Collection<Warning> getWarnings();
Collection<CursorWarning> getWarnings();

/**
* @return indicating whether the query result was served from the query cache or not
Expand Down
Loading