0
我正在使用ActiveAndroid
库。我需要获得按integer
字段排序的我的对象列表。这里是我如何试图做到这一点:SQLite按整数值排序
public static List<Category> getCategories() {
try {
return new Select()
.all()
.from(Category.class)
.orderBy("NumInRow ASC") // NumInRow is my int field
.execute();
} catch (Exception ignored) {
return null;
}
}
我是对的吗?