Skip to content

Commit 418acb2

Browse files
author
mpv1989
committed
Add deduplicate field for hash/skiplist index
1 parent 91ebab7 commit 418acb2

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ v4.2.2 (xxxx-xx-xx)
99
* added ArangoDatabase.updateUserDefaultCollectionAccess(String, Permissions)
1010
* added ArangoCollection.getDocuments(Collection<String>, Class)
1111
* added connection/handshake retry on same host
12+
* added deduplicate field for hash/skiplist index
1213

1314
v4.2.1 (2017-06-20)
1415
---------------------------

src/main/java/com/arangodb/entity/IndexEntity.java

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class IndexEntity {
3838
private Boolean isNewlyCreated;
3939
private Boolean geoJson;
4040
private Boolean constraint;
41+
private Boolean deduplicate;
4142

4243
public IndexEntity() {
4344
super();
@@ -83,4 +84,8 @@ public Boolean getConstraint() {
8384
return constraint;
8485
}
8586

87+
public Boolean getDeduplicate() {
88+
return deduplicate;
89+
}
90+
8691
}

src/main/java/com/arangodb/model/HashIndexOptions.java

+15
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class HashIndexOptions {
3535
private final IndexType type = IndexType.hash;
3636
private Boolean unique;
3737
private Boolean sparse;
38+
private Boolean deduplicate;
3839

3940
public HashIndexOptions() {
4041
super();
@@ -86,4 +87,18 @@ public HashIndexOptions sparse(final Boolean sparse) {
8687
return this;
8788
}
8889

90+
public Boolean getDeduplicate() {
91+
return deduplicate;
92+
}
93+
94+
/**
95+
* @param deduplicate
96+
* if false, the deduplication of array values is turned off.
97+
* @return options
98+
*/
99+
public HashIndexOptions deduplicate(final Boolean deduplicate) {
100+
this.deduplicate = deduplicate;
101+
return this;
102+
}
103+
89104
}

src/main/java/com/arangodb/model/SkiplistIndexOptions.java

+15
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class SkiplistIndexOptions {
3535
private final IndexType type = IndexType.skiplist;
3636
private Boolean unique;
3737
private Boolean sparse;
38+
private Boolean deduplicate;
3839

3940
public SkiplistIndexOptions() {
4041
super();
@@ -86,4 +87,18 @@ public SkiplistIndexOptions sparse(final Boolean sparse) {
8687
return this;
8788
}
8889

90+
public Boolean getDeduplicate() {
91+
return deduplicate;
92+
}
93+
94+
/**
95+
* @param deduplicate
96+
* if false, the deduplication of array values is turned off.
97+
* @return options
98+
*/
99+
public SkiplistIndexOptions deduplicate(final Boolean deduplicate) {
100+
this.deduplicate = deduplicate;
101+
return this;
102+
}
103+
89104
}

0 commit comments

Comments
 (0)