| 29 | } |
| 30 | |
| 31 | std::string SortKey::ToString() const { |
| 32 | std::stringstream ss; |
| 33 | ss << target.ToString() << ' '; |
| 34 | switch (order) { |
| 35 | case SortOrder::Ascending: |
| 36 | ss << "ASC"; |
| 37 | break; |
| 38 | case SortOrder::Descending: |
| 39 | ss << "DESC"; |
| 40 | break; |
| 41 | } |
| 42 | switch (null_placement) { |
| 43 | case NullPlacement::AtStart: |
| 44 | ss << " NULLS FIRST"; |
| 45 | break; |
| 46 | case NullPlacement::AtEnd: |
| 47 | ss << " NULLS LAST"; |
| 48 | break; |
| 49 | } |
| 50 | return ss.str(); |
| 51 | } |
| 52 | |
| 53 | bool Ordering::IsSuborderOf(const Ordering& other) const { |
| 54 | if (sort_keys_.empty()) { |
nothing calls this directly
no test coverage detected