MCPcopy Create free account
hub / github.com/jOOQ/jOOQ / sortedValues

Method sortedValues

jOOQ/src/main/java/org/jooq/impl/JSONReader.java:229–240  ·  view source on GitHub ↗
(Map<String, Object> record)

Source from the content-addressed store, hash-verified

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);

Callers 1

readMethod · 0.95

Calls 7

sizeMethod · 0.65
setMethod · 0.65
substringMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65
entrySetMethod · 0.45
parseIntMethod · 0.45

Tested by

no test coverage detected