File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -481,26 +481,26 @@ private string Sort()
481481 if ( _loadOption . Sort != null )
482482 sortingInfos . AddRange ( _loadOption . Sort . Where ( x => x . Selector != null ) . ToList ( ) ) ;
483483 else
484- return _settings . StableSort ? $ "SORT { _settings . IteratorVar } ._key" : string . Empty ;
484+ return _settings . StableSort ? $ "SORT { _settings . SortIteratorVar ?? _settings . IteratorVar } ._key" : string . Empty ;
485485
486486
487487 var sort = "SORT " + string . Join ( ", " ,
488488 sortingInfos . Select ( x =>
489489 {
490490 var prop = PropertyName ( _settings . ValidPropertyName ( x . Selector )
491- . FirstCharOfPropertiesToUpper ( ) ) ;
491+ . FirstCharOfPropertiesToUpper ( ) , _settings . SortIteratorVar ) ;
492492 return $ "{ prop } { ( x . Desc ? "DESC" : "ASC" ) } ";
493493 } ) ) ;
494494
495495 if ( _settings . StableSort && ! sort . Contains ( "_key" ) )
496- sort += $ ", { _settings . IteratorVar } ._key";
496+ sort += $ ", { _settings . SortIteratorVar ?? _settings . IteratorVar } ._key";
497497
498498 return sort ;
499499 }
500500
501- bool IsCriteria ( IList item ) {
501+ /* bool IsCriteria(IList item) {
502502 return (item[0] is IList);
503- }
503+ }*/
504504
505505
506506 private string GetMatchingFilter ( IList dxFilter , bool not = false )
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ public class ArangoTransformSettings
3434 /// </summary>
3535 public string IteratorVar { get ; set ; } = "x" ;
3636
37+ /// <summary>
38+ /// SORT {SortIteratorVar}.{...} ASC
39+ /// </summary>
40+ public string SortIteratorVar { get ; set ; } = null ;
41+
3742 /// <summary>
3843 /// Name of primary key in client side model - default: key
3944 /// </summary>
You can’t perform that action at this time.
0 commit comments