Re: EDB Sorting
- Posted by mattlewis (admin) Dec 28, 2015
- 1324 views
I'm working with an EDB file and have the need to sort it by a particular column.
Native EDB doesn't have a concept of columns. It's a key-value store. You can use custom_sort once you've loaded the data.
Does anybody have any thoughts on a efficient way to sort an EDB file? I've thought about retrieving the field to be sorted by along with the key field, sorting that and creating a new database (after renaming the original) in the correct order. I've also considered retrieving the entire database into an array, sorting the array and then replacing the existing database records. Neither excites me a lot and I can't help but think that someone may have already solved this issue.
But now reading this, it sounds like you want it stored sorted? The format specifies that it's stored sorted by the key. There's really no alternative to this. I don't understand what you are trying to accomplish with the sorting.
Alternatively, you could try EuSQL, which adds some stuff to get a SQL-ish database using EDB as the underlying storage:
Matt