mbdavid / LiteDB

LiteDB - A .NET NoSQL Document Store in a single data file
http://www.litedb.org
MIT License
8.62k stars 1.25k forks source link

will litedb v5 support query Thenby in the future? #1330

Open Jokder opened 5 years ago

Jokder commented 5 years ago

hello david Just i used collection.Query().OrderBy(),but i found there's no Thenby supported now,My application target machine has poor memory,so i really like love now litedb can use linq OrderBy on disk,I hope litedb will support Thenby,thanks for your time.

mbdavid commented 5 years ago

Hi, for my first release there is no plans yet for ThenBy. If you have all fields in same order, you can sort a new array:

.OrderBy(“[Name,Age]”)

lawrence-laz commented 2 years ago

This .OrderBy(x => new object[] { x.Name, x.Age }) seems to work as well, for those who prefer expression syntax. But I am still scared to face a scenario where I would need to order two columns in different order. 😨