Open nichtich opened 9 years ago
Can in this case the sort in the to_array() feature be deleted? It would be a much cleaner to do something like:
Catmandu->importer(...)->select(...)->sort(...)->to_array;
then
Catmandu->importer(...)->select(...)->to_array(sort => ....);
yes both features should be discussed together.
PR #161 implements $iterator->sort(...)
without extended sorting options. I am not sure how to best express these options in the method and in the command line client. Possible options:
In the CLI I'd prefer short names, such as --rsort ...
, this could be alias to --reverse 1 --sort ...
, right?
To sort items by a given field, e.g. sort by field
creator.name
or to sort reverse by numeric fieldsize
:I'd prefer four options
sort
,nsort
,rsort
,nrsort
instead ofsort
,numerical
andreverse
but names can be discussed. Sorting would always imply buffering all items before export.