Closed oneassasin closed 9 years ago
You can specify multiple columns divided by ,
in orderBy
clause. We've followed same semantic as SQLiteDatabase.query()
.
Example:
storIOSQLite
.get()
...
.withQuery(Query.builder()
.table("some_table")
.orderBy("column1, column2")
.build())
@NonNull
public CompleteBuilder orderBy(@Nullable String orderBy) {
this.orderBy = orderBy;
return this;
}
StorIOSQLite 1.6.1
Yep, this orderBy
string can contain multiple columns divided by comma ,
:smile:
Ooops. I do not write what he wanted. :smile:
Why do I generate this line, if you can do it within the library :question:
Simply because we don't want to do any kind of SQL parsing/processing/generating in the StorIO, it's not an ORM, it's a DAO. The same is applicable to Query.where()
and Query.limit()
.
Please, add, becouse options for sorting can be many.