Connect pagination bar to dataset and repeater using code.

I was wondering how to connect a pagination bar to a dataset and repeater so that when the pagination bar is clicked or changed, it cycles through pages in the dataset which are then displayed in the repeater. I know this can be done by connecting the pagination bar through the connect to data feature but I need this to be done purely through code. If this is possible that would be great. Thanks! code #repeater #data #pagination

These simple support pages should help here.
https://support.wix.com/en/article/working-with-the-connect-repeater-panel
https://support.wix.com/en/article/adding-and-setting-up-a-pagination-bar
https://support.wix.com/en/article/corvid-tutorial-creating-previous-and-next-buttons-for-a-dynamic-item-page-with-code

For pagination code itself see here.
https://www.wix.com/corvid/reference/$w.Pagination.html
Wix Dataset API.
https://www.wix.com/corvid/reference/wix-dataset.html