schematic
schematic copied to clipboard
Limit with Parameter
Hi, How can I use limit with parameters look this example `@InexactContentUri(
path = Path.BOOK_QUESTION_TABLE + "/#/"
+ Path.BOOK_QUESTION_WITH_CHAPTER + "/#/"
+ Path.BOOK_QUESTION_WITH_LIMIT + "/#",
name = "BOOK_QUESTION",
type = "vnd.android.cursor.item/list",
whereColumn = {ExamTables.BookQuestionColumns.SUBJECT_ID,
ExamTables.BookQuestionColumns.CHAPTER},
limit = "10",
pathSegment = {1, 3, 5})
public static Uri withChapterAndLimit(int subjectId, int chapter, int limit) {
return buildUri(String.valueOf(subjectId), String.valueOf(chapter), String.valueOf(limit));
}
` I want to limit list of question by path segment 5?
Thanks in advance.
I'm afraid that's not possible. The caller will have to limit in their query if you want a non-static limit. Eventually I'd like to be able to pass limit as a query parameter in the Uri, but it's not something I'm working on right now.