When I used OrmLite I have been able to query for single column (like id) to use list of ids in other query (for example, for IN statement). OrmLite has RawRowMapper for this and I could make something like this:
and had only ids. With GreenDAO I should write following:
private List<Long> getSomeIdss() throws SQLException {
List<Item> items = internalDao.queryRaw(
"___ almost the same query here___"
);
List<Long> ids = new ArrayList<>(items.size());
for (Item item : items) {
ids.add(item.getNonNullId());
}
return ids;
}
I didn't make speed comparison, but I can suggest that redundant iteration has some impact. So if there is no feature like this to query for a single column, this can be feature request. But maybe, I miss something.
When I used OrmLite I have been able to query for single column (like
id
) to use list of ids in other query (for example, forIN
statement). OrmLite hasRawRowMapper
for this and I could make something like this:and had only ids. With GreenDAO I should write following:
I didn't make speed comparison, but I can suggest that redundant iteration has some impact. So if there is no feature like this to query for a single column, this can be feature request. But maybe, I miss something.