Pagination method invocation

Report a typo

Here is a database that contains news:

id

topic

description

author

1

Sport

Football Championship

Bob

2

Economy

Downturn in the labor market

Jim

3

Show Business

Release of a new film

Kelly

4

Economy

Economic forecast

Michael

5

Sport

tennis scores

Robbin

6

Music

Band's new album

Kim

7

Sport

Сhampionship schedule

Bob

We have declared a method findByTopic to get a list of news by a specific topic:

public interface NewsRepository extends CrudRepository<NewsItem, Long> {
 
    @Query(value = "SELECT * FROM news WHERE topic = :topic ORDER BY id LIMIT :size OFFSET :size * :page"
    nativeQuery = true
    )
    List<NewsItem> findByTopic(String topic, int size, int page);
}

After calling this method, we got the following list of news:

7

Sport

Сhampionship schedule

Bob

Which of the following calls are correct?

Select one or more options from the list
___

Create a free account to access the full topic