public static List<Map<String, Object>> tableToList(Table t) {
List<Map<String, Object>> mapList = new ArrayList<>();
for (int i = 0; i < t.rows().size(); i++) {
Map<String, Object> map = new HashMap<>();
for (int j = 0; j < t.columns().size(); j++) {
map.put(t.columns().get(j).getName(), t.rows().get(i).getObject(j));
}
mapList.add(map);
}
return mapList;
}
Sure. I'll try it.
--
You received this message because you are subscribed to a topic in the Google Groups "sql2o" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sql2o/-Z7p7eVhEQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sql2o+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.