MCPcopy Create free account
hub / github.com/cmu-db/benchbase / toList

Method toList

src/main/java/com/oltpbenchmark/util/SQLUtil.java:289–303  ·  view source on GitHub ↗
(ResultSet rs)

Source from the content-addressed store, hash-verified

287 }
288
289 public static List<Object[]> toList(ResultSet rs) throws SQLException {
290 ResultSetMetaData rs_md = rs.getMetaData();
291 int num_cols = rs_md.getColumnCount();
292
293 List<Object[]> results = new ArrayList<>();
294 while (rs.next()) {
295 Object[] row = new Object[num_cols];
296 for (int i = 0; i < num_cols; i++) {
297 row[i] = rs.getObject(i + 1);
298 }
299 results.add(row);
300 }
301
302 return results;
303 }
304
305 /**
306 * For the given string representation of a value, convert it to the proper object based on its

Callers 4

runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
testInitMethod · 0.80

Calls 4

getMetaDataMethod · 0.80
getColumnCountMethod · 0.80
addMethod · 0.80
nextMethod · 0.45

Tested by 1

testInitMethod · 0.64