[#746] can now give (repl) row result sort function in DataObject constructor#747
[#746] can now give (repl) row result sort function in DataObject constructor#747d-w-moore wants to merge 1 commit intoirods:mainfrom
Conversation
This affects the overall {create,access,modify}_time, which is
simplistically extracted from the first row in the query result-set.
|
What is this work part of? Did you need it for something else? Why do we sort by replica number by default? Should be sorting by 'good' replicas first? |
|
oh, #746, it's right there... sorry... |
(1.) I hint at this above, but basically data_obj.replicas[0].modify_time becomes data_obj.modify_time. So yes, (2.) it would make sense to sort according to good/bad. Or according to modify_time but with reverse sort order. |
| class iRODSDataObject: | ||
|
|
||
| def __init__(self, manager, parent=None, results=None): | ||
| def __init__(self, manager, /, parent=None, results=None, *, results_sort_key = None): |
There was a problem hiding this comment.
Will the / break this interface? In other words, if a client is calling this with manager as a keyword argument, will this cause it to experience errors? I doubt anybody is doing that, but just curious since this will be going into a minor release.
There was a problem hiding this comment.
Yes, that usage would break, but there's no reason we can't include manager as an optional-keyword arg. good eye!
This affects the overall {create,access,modify}_time, which is simplistically extracted from the first row in the query result-set.