- send_(makecmd("SORT") << key
- << " BY " << by_pattern
- << " LIMIT " << limit_start << ' ' << limit_end
- << " GET " << get_pattern
- << (order == sort_order_ascending ? " ASC" : " DESC")
- << (lexicographically ? " ALPHA" : ""));
+ makecmd m("SORT");
+
+ m << key
+ << " BY " << by_pattern
+ << " LIMIT " << limit_start << ' ' << limit_end;
+
+ client::string_vector::const_iterator it = get_patterns.begin();
+ for ( ; it != get_patterns.end(); ++it)
+ m << " GET " << *it;
+
+ m << (order == sort_order_ascending ? " ASC" : " DESC")
+ << (lexicographically ? " ALPHA" : "");
+
+ send_(m);