Skip to content

Commit 402fe58

Browse files
author
mpv1989
committed
Add AqlQueryOptions.skipInaccessibleCollections(Boolean)
1 parent 118699e commit 402fe58

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ v4.3.3 (2018-xx-xx)
88
* added AqlQueryOptions.intermediateCommitCount(Long)
99
* added AqlQueryOptions.intermediateCommitSize(Long)
1010
* added AqlQueryOptions.satelliteSyncWait(Double)
11+
* added AqlQueryOptions.skipInaccessibleCollections(Boolean)
1112
* added TransactionOptions.maxTransactionSize(Long)
1213
* added TransactionOptions.intermediateCommitCount(Long)
1314
* added TransactionOptions.intermediateCommitSize(Long)

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,26 @@ public AqlQueryOptions satelliteSyncWait(final Double satelliteSyncWait) {
271271
return this;
272272
}
273273

274+
public Boolean getSkipInaccessibleCollections() {
275+
return options != null ? options.skipInaccessibleCollections : null;
276+
}
277+
278+
/**
279+
* @param skipInaccessibleCollections
280+
* AQL queries (especially graph traversals) will treat collection to which a user has no access rights
281+
* as if these collections were empty. Instead of returning a forbidden access error, your queries will
282+
* execute normally. This is intended to help with certain use-cases: A graph contains several
283+
* collections and different users execute AQL queries on that graph. You can now naturally limit the
284+
* accessible results by changing the access rights of users on collections. This feature is only
285+
* available in the Enterprise Edition.
286+
* @since ArangoDB 3.2.0
287+
* @return options
288+
*/
289+
public AqlQueryOptions skipInaccessibleCollections(final Boolean skipInaccessibleCollections) {
290+
getOptions().skipInaccessibleCollections = skipInaccessibleCollections;
291+
return this;
292+
}
293+
274294
public Boolean getFullCount() {
275295
return options != null ? options.fullCount : null;
276296
}
@@ -340,6 +360,7 @@ private static class Options {
340360
private Long intermediateCommitCount;
341361
private Long intermediateCommitSize;
342362
private Double satelliteSyncWait;
363+
private Boolean skipInaccessibleCollections;
343364
private Optimizer optimizer;
344365
private Boolean fullCount;
345366
private Integer maxPlans;

0 commit comments

Comments
 (0)