Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

### Fixed

- custom serde not always used

### Added

- split `GraphDocumentReadOptions` from `DocumentReadOptions` (breaking change)
- added `ArangoCollection#getResponsibleShard(Object)`
- added support for Analyzers
- added support for Stream Transactions
- added support for named indices
- added support for TTL indices
- added minReplicationAttribute for collections and graphs

## [5.1.0] - 2019-28-08

### Fixed
Expand Down
60 changes: 20 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.arangodb</groupId>
<artifactId>arangodb-java-driver-async</artifactId>
<version>5.1.0</version>
<version>6.0.0-SNAPSHOT</version>
<inceptionYear>2016</inceptionYear>
<packaging>jar</packaging>

Expand All @@ -22,11 +22,14 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<logback-classic.version>1.1.3</logback-classic.version>
<logback-classic.version>1.2.3</logback-classic.version>
<hamcrest-all.version>1.3</hamcrest-all.version>
<junit.version>4.12</junit.version>
<arangodb-java-driver.version>5.0.7</arangodb-java-driver.version>
<arangodb-java-driver.version>6.1.0</arangodb-java-driver.version>
<arangodb.velocypack.module.jdk8.version>1.1.0</arangodb.velocypack.module.jdk8.version>

<!-- javadoc-->
<javadoc.opts/>
</properties>

<developers>
Expand Down Expand Up @@ -76,7 +79,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.5</version>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -85,56 +88,27 @@
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<finalName>
${project.artifactId}-${project.version}-standalone
</finalName>
<attach>false</attach>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgument></compilerArgument>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<version>3.1.0</version>
<executions>
<execution>
<goals>
Expand All @@ -147,15 +121,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
<additionalOptions>${javadoc.opts}</additionalOptions>
<excludePackageNames>com.arangodb.internal</excludePackageNames>
</configuration>
</execution>
Expand All @@ -164,7 +138,7 @@

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<version>2.22.2</version>
<configuration>
<includes>
<include>**/*Test.java</include>
Expand All @@ -185,7 +159,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -225,6 +199,12 @@
<artifactId>hamcrest-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>jackson-dataformat-velocypack</artifactId>
<version>0.1.4</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down
73 changes: 47 additions & 26 deletions src/main/java/com/arangodb/ArangoCollectionAsync.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,8 @@
import java.util.Collection;
import java.util.concurrent.CompletableFuture;

import com.arangodb.entity.CollectionEntity;
import com.arangodb.entity.CollectionPropertiesEntity;
import com.arangodb.entity.CollectionRevisionEntity;
import com.arangodb.entity.DocumentCreateEntity;
import com.arangodb.entity.DocumentDeleteEntity;
import com.arangodb.entity.DocumentImportEntity;
import com.arangodb.entity.DocumentUpdateEntity;
import com.arangodb.entity.IndexEntity;
import com.arangodb.entity.MultiDocumentEntity;
import com.arangodb.entity.Permissions;
import com.arangodb.model.CollectionCreateOptions;
import com.arangodb.model.CollectionPropertiesOptions;
import com.arangodb.model.DocumentCreateOptions;
import com.arangodb.model.DocumentDeleteOptions;
import com.arangodb.model.DocumentExistsOptions;
import com.arangodb.model.DocumentImportOptions;
import com.arangodb.model.DocumentReadOptions;
import com.arangodb.model.DocumentReplaceOptions;
import com.arangodb.model.DocumentUpdateOptions;
import com.arangodb.model.FulltextIndexOptions;
import com.arangodb.model.GeoIndexOptions;
import com.arangodb.model.HashIndexOptions;
import com.arangodb.model.PersistentIndexOptions;
import com.arangodb.model.SkiplistIndexOptions;
import com.arangodb.entity.*;
import com.arangodb.model.*;

/**
* Interface for operations on ArangoDB collection level.
Expand Down Expand Up @@ -535,6 +513,17 @@ CompletableFuture<IndexEntity> ensureFulltextIndex(
final Iterable<String> fields,
final FulltextIndexOptions options);

/**
* Creates a ttl index for the collection, if it does not already exist.
*
* @param fields A list of attribute paths
* @param options Additional options, can be null
* @return information about the index
* @see <a href="https://www.arangodb.com/docs/stable/http/indexes-ttl.html">API
* Documentation</a>
*/
CompletableFuture<IndexEntity> ensureTtlIndex(Iterable<String> fields, TtlIndexOptions options);

/**
* Returns all indexes of the collection
*
Expand All @@ -554,23 +543,42 @@ CompletableFuture<IndexEntity> ensureFulltextIndex(

/**
* Removes all documents from the collection, but leaves the indexes intact
*
*
* @see <a href="https://docs.arangodb.com/current/HTTP/Collection/Creating.html#truncate-collection">API
* Documentation</a>
* @return information about the collection
*/
CompletableFuture<CollectionEntity> truncate();

/**
* Removes all documents from the collection, but leaves the indexes intact
*
* @see <a href="https://docs.arangodb.com/current/HTTP/Collection/Creating.html#truncate-collection">API
* Documentation</a>
* @return information about the collection
*/
CompletableFuture<CollectionEntity> truncate(CollectionTruncateOptions options);

/**
* Counts the documents in a collection
*
*
* @see <a href=
* "https://docs.arangodb.com/current/HTTP/Collection/Getting.html#return-number-of-documents-in-a-collection">API
* Documentation</a>
* @return information about the collection, including the number of documents
*/
CompletableFuture<CollectionPropertiesEntity> count();

/**
* Counts the documents in a collection
*
* @see <a href=
* "https://docs.arangodb.com/current/HTTP/Collection/Getting.html#return-number-of-documents-in-a-collection">API
* Documentation</a>
* @return information about the collection, including the number of documents
*/
CompletableFuture<CollectionPropertiesEntity> count(CollectionCountOptions options);

/**
* Creates the collection
*
Expand Down Expand Up @@ -676,6 +684,19 @@ CompletableFuture<IndexEntity> ensureFulltextIndex(
*/
CompletableFuture<CollectionEntity> rename(final String newName);

/**
* Returns the responsible shard for the document.
* Please note that this API is only meaningful and available on a cluster coordinator.
*
* @param value A projection of the document containing at least the shard key (_key or a custom attribute) for
* which the responsible shard should be determined
* @return information about the responsible shard
* @see <a href="https://docs.arangodb.com/current/HTTP/collection-getting.html#return-responsible-shard-for-a-document">
* API Documentation</a>
* @since ArangoDB 3.5.0
*/
CompletableFuture<ShardEntity> getResponsibleShard(final Object value);

/**
* Retrieve the collections revision
*
Expand Down
Loading