core icon indicating copy to clipboard operation
core copied to clipboard

WIP/idea - Deep Sort/Mutli Sort

Open stefanheimes opened this issue 9 years ago • 1 comments

Thing about it, how to add the deep sorting or multi sorting in metamodels.

One idea from @davidmaack was to ask each attribute and get the sorted ID's and the values. Now you can check the first list, if you have some duplicate values, you get this ID's and make a lookup in the second array list to get the sorting and so on.

Be careful we get a list from all attributes and don't do a sub-sql only for this ID's.

I have look in PHP there are some nice function:

http://php.net/manual/de/function.array-keys.php Good to find the keys from some values, if we use the search pram from this funktion.

http://us2.php.net/manual/en/function.array-count-values.php Good to check if we have duplicate values.

stefanheimes avatar Aug 25 '16 15:08 stefanheimes

For id sorting, have a look in ToolBoxFile where I already implemented id lookup sorting. :)

On the overall topic, this will only work for simple values like text and the like I asusme. Deep comparing array will most likely be a time killer.

discordier avatar Aug 25 '16 15:08 discordier