| 227 | } |
| 228 | |
| 229 | private static final List<Object> sortedValues(Map<String, Object> record) { |
| 230 | |
| 231 | // [#13200] The MULTISET map keys are always of the form v0, v1, v2, ... |
| 232 | List<Object> result = asList(new Object[record.size()]); |
| 233 | |
| 234 | // [#13200] Knowing the key format, we can "sort" the contents in O(N) |
| 235 | // rather than with a more name-agnostic O(N log N) approach |
| 236 | for (Entry<String, Object> e : record.entrySet()) |
| 237 | result.set(parseInt(e.getKey().substring(1)), e.getValue()); |
| 238 | |
| 239 | return result; |
| 240 | } |
| 241 | |
| 242 | static final Set<SQLDialect> ENCODE_BINARY_AS_HEX = SQLDialect.supportedBy(H2, POSTGRES, SQLITE, TRINO, YUGABYTEDB); |
| 243 | static final Set<SQLDialect> ENCODE_BINARY_AS_TEXT = SQLDialect.supportedBy(MARIADB); |