File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed 
src/main/java/com/arangodb/model Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 2020
2121package  com .arangodb .model ;
2222
23+ import  java .util .ArrayList ;
24+ import  java .util .Arrays ;
2325import  java .util .Collection ;
2426
2527import  com .arangodb .velocypack .VPackSlice ;
@@ -370,6 +372,21 @@ public AqlQueryOptions stream(final Boolean stream) {
370372return  this ;
371373}
372374
375+ public  Collection <String > getShardIds () {
376+ return  options  != null  ? options .shardIds  : null ;
377+ }
378+ 
379+ /** 
380+  * Restrict query to shards by given ids. This is an internal option. Use at your own risk. 
381+  *  
382+  * @param shardIds 
383+  * @return options 
384+  */ 
385+ public  AqlQueryOptions  shardIds (final  String ... shardIds ) {
386+ getOptions ().getShardIds ().addAll (Arrays .asList (shardIds ));
387+ return  this ;
388+ }
389+ 
373390private  Options  getOptions () {
374391if  (options  == null ) {
375392options  = new  Options ();
@@ -390,6 +407,7 @@ private static class Options {
390407private  Boolean  fullCount ;
391408private  Integer  maxPlans ;
392409private  Boolean  stream ;
410+ private  Collection <String > shardIds ;
393411
394412protected  Optimizer  getOptimizer () {
395413if  (optimizer  == null ) {
@@ -398,6 +416,13 @@ protected Optimizer getOptimizer() {
398416return  optimizer ;
399417}
400418
419+ protected  Collection <String > getShardIds () {
420+ if  (shardIds  == null ) {
421+ shardIds  = new  ArrayList <String >();
422+ }
423+ return  shardIds ;
424+ }
425+ 
401426}
402427
403428private  static  class  Optimizer  {
                                 You can’t perform that action at this time. 
               
                  
0 commit comments