@@ -68,6 +68,13 @@ class Collection
68
68
* @var bool - isVolatile value
69
69
*/
70
70
private $ _isVolatile ;
71
+
72
+ /**
73
+ * The distributeShardsLike value (might be NULL for new collections)
74
+ *
75
+ * @var mixed - distributeShardsLike value
76
+ */
77
+ private $ _distributeShardsLike ;
71
78
72
79
/**
73
80
* The collection numberOfShards value (might be NULL for new collections)
@@ -96,6 +103,13 @@ class Collection
96
103
* @var array - shardKeys value
97
104
*/
98
105
private $ _shardKeys ;
106
+
107
+ /**
108
+ * The smartJoinAttribute value (might be NULL for new collections)
109
+ *
110
+ * @var mixed - smartJoinAttribute value
111
+ */
112
+ private $ _smartJoinAttribute ;
99
113
100
114
/**
101
115
* The collection status value
@@ -155,6 +169,11 @@ class Collection
155
169
* Collection 'isVolatile' index
156
170
*/
157
171
const ENTRY_IS_VOLATILE = 'isVolatile ' ;
172
+
173
+ /**
174
+ * Collection 'distributeShardsLike' index
175
+ */
176
+ const ENTRY_DISTRIBUTE_SHARDS_LIKE = 'distributeShardsLike ' ;
158
177
159
178
/**
160
179
* Collection 'numberOfShards' index
@@ -170,11 +189,16 @@ class Collection
170
189
* Collection 'shardingStrategy' index
171
190
*/
172
191
const ENTRY_SHARDING_STRATEGY = 'shardingStrategy ' ;
173
-
192
+
174
193
/**
175
194
* Collection 'shardKeys' index
176
195
*/
177
196
const ENTRY_SHARD_KEYS = 'shardKeys ' ;
197
+
198
+ /**
199
+ * Collection 'smartJoinAttribute' index
200
+ */
201
+ const ENTRY_SMART_JOIN_ATTRIBUTE = 'smartJoinAttribute ' ;
178
202
179
203
/**
180
204
* properties option
@@ -271,16 +295,18 @@ public static function getDefaultType()
271
295
*/
272
296
public function __clone ()
273
297
{
274
- $ this ->_id = null ;
275
- $ this ->_name = null ;
276
- $ this ->_waitForSync = null ;
277
- $ this ->_journalSize = null ;
278
- $ this ->_isSystem = null ;
279
- $ this ->_isVolatile = null ;
280
- $ this ->_numberOfShards = null ;
281
- $ this ->_replicationFactor = null ;
282
- $ this ->_shardingStrategy = null ;
283
- $ this ->_shardKeys = null ;
298
+ $ this ->_id = null ;
299
+ $ this ->_name = null ;
300
+ $ this ->_waitForSync = null ;
301
+ $ this ->_journalSize = null ;
302
+ $ this ->_isSystem = null ;
303
+ $ this ->_isVolatile = null ;
304
+ $ this ->_distributeShardsLike = null ;
305
+ $ this ->_numberOfShards = null ;
306
+ $ this ->_replicationFactor = null ;
307
+ $ this ->_shardingStrategy = null ;
308
+ $ this ->_shardKeys = null ;
309
+ $ this ->_smartJoinAttribute = null ;
284
310
}
285
311
286
312
/**
@@ -335,6 +361,10 @@ public function getAll()
335
361
self ::ENTRY_STATUS => $ this ->_status ,
336
362
self ::ENTRY_KEY_OPTIONS => $ this ->_keyOptions
337
363
];
364
+
365
+ if (null !== $ this ->_distributeShardsLike ) {
366
+ $ result [self ::ENTRY_DISTRIBUTE_SHARDS_LIKE ] = $ this ->_distributeShardsLike ;
367
+ }
338
368
339
369
if (null !== $ this ->_numberOfShards ) {
340
370
$ result [self ::ENTRY_NUMBER_OF_SHARDS ] = $ this ->_numberOfShards ;
@@ -347,10 +377,14 @@ public function getAll()
347
377
if (null !== $ this ->_shardingStrategy ) {
348
378
$ result [self ::ENTRY_SHARDING_STRATEGY ] = $ this ->_shardingStrategy ;
349
379
}
350
-
380
+
351
381
if (is_array ($ this ->_shardKeys )) {
352
382
$ result [self ::ENTRY_SHARD_KEYS ] = $ this ->_shardKeys ;
353
383
}
384
+
385
+ if (null !== $ this ->_smartJoinAttribute ) {
386
+ $ result [self ::ENTRY_SMART_JOIN_ATTRIBUTE ] = $ this ->_smartJoinAttribute ;
387
+ }
354
388
355
389
return $ result ;
356
390
}
@@ -378,79 +412,76 @@ public function set($key, $value)
378
412
379
413
if ($ key === self ::ENTRY_ID ) {
380
414
$ this ->setId ($ value );
381
-
382
415
return ;
383
416
}
384
417
385
418
if ($ key === self ::ENTRY_NAME ) {
386
419
$ this ->setName ($ value );
387
-
388
420
return ;
389
421
}
390
422
391
423
if ($ key === self ::ENTRY_WAIT_SYNC ) {
392
424
$ this ->setWaitForSync ($ value );
393
-
394
425
return ;
395
426
}
396
427
397
428
if ($ key === self ::ENTRY_JOURNAL_SIZE ) {
398
429
$ this ->setJournalSize ($ value );
399
-
400
430
return ;
401
431
}
402
432
403
433
if ($ key === self ::ENTRY_IS_SYSTEM ) {
404
434
$ this ->setIsSystem ($ value );
405
-
406
435
return ;
407
436
}
408
437
409
438
if ($ key === self ::ENTRY_IS_VOLATILE ) {
410
439
$ this ->setIsVolatile ($ value );
411
-
412
440
return ;
413
441
}
414
442
415
443
if ($ key === self ::ENTRY_TYPE ) {
416
444
$ this ->setType ($ value );
417
-
418
445
return ;
419
446
}
420
447
421
448
if ($ key === self ::ENTRY_STATUS ) {
422
449
$ this ->setStatus ($ value );
423
-
424
450
return ;
425
451
}
426
452
427
453
if ($ key === self ::ENTRY_KEY_OPTIONS ) {
428
454
$ this ->setKeyOptions ($ value );
429
-
455
+ return ;
456
+ }
457
+
458
+ if ($ key === self ::ENTRY_DISTRIBUTE_SHARDS_LIKE ) {
459
+ $ this ->setDistributeShardsLike ($ value );
430
460
return ;
431
461
}
432
462
433
463
if ($ key === self ::ENTRY_NUMBER_OF_SHARDS ) {
434
464
$ this ->setNumberOfShards ($ value );
435
-
436
465
return ;
437
466
}
438
467
439
468
if ($ key === self ::ENTRY_REPLICATION_FACTOR ) {
440
469
$ this ->setReplicationFactor ($ value );
441
-
442
470
return ;
443
471
}
444
472
445
473
if ($ key === self ::ENTRY_SHARDING_STRATEGY ) {
446
474
$ this ->setShardingStrategy ($ value );
447
-
448
475
return ;
449
476
}
450
-
477
+
451
478
if ($ key === self ::ENTRY_SHARD_KEYS ) {
452
479
$ this ->setShardKeys ($ value );
453
-
480
+ return ;
481
+ }
482
+
483
+ if ($ key === self ::ENTRY_SMART_JOIN_ATTRIBUTE ) {
484
+ $ this ->setSmartJoinAttribute ($ value );
454
485
return ;
455
486
}
456
487
// unknown attribute, will be ignored
@@ -726,6 +757,28 @@ public function getIsVolatile()
726
757
{
727
758
return $ this ->_isVolatile ;
728
759
}
760
+
761
+ /**
762
+ * Set the distribute shards like value
763
+ *
764
+ * @param string $value - distributeShardsLike value
765
+ *
766
+ * @return void
767
+ */
768
+ public function setDistributeShardsLike ($ value )
769
+ {
770
+ $ this ->_distributeShardsLike = $ value ;
771
+ }
772
+
773
+ /**
774
+ * Get the distributeShardsLike (if already known)
775
+ *
776
+ * @return mixed - distributeShardsLike value
777
+ */
778
+ public function getDistributeShardsLike ()
779
+ {
780
+ return $ this ->_distributeShardsLike ;
781
+ }
729
782
730
783
/**
731
784
* Set the numberOfShards value
@@ -795,7 +848,7 @@ public function getShardingStrategy()
795
848
{
796
849
return $ this ->_shardingStrategy ;
797
850
}
798
-
851
+
799
852
/**
800
853
* Set the shardKeys value
801
854
*
@@ -818,6 +871,28 @@ public function getShardKeys()
818
871
{
819
872
return $ this ->_shardKeys ;
820
873
}
874
+
875
+ /**
876
+ * Set the smart join attribute value
877
+ *
878
+ * @param string $value - smartJoinAttribute value
879
+ *
880
+ * @return void
881
+ */
882
+ public function setSmartJoinAttribute ($ value )
883
+ {
884
+ $ this ->_smartJoinAttribute = $ value ;
885
+ }
886
+
887
+ /**
888
+ * Get the smart join attribute value (if already known)
889
+ *
890
+ * @return mixed - smart join attribute value
891
+ */
892
+ public function getSmartJoinAttribute ()
893
+ {
894
+ return $ this ->_smartJoinAttribute ;
895
+ }
821
896
}
822
897
823
898
class_alias (Collection::class, '\triagens\ArangoDb\Collection ' );
0 commit comments