Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Pagination REST Data Services in the database

user5108636Feb 29 2024

Using 19c and created a rest web service with a PLSQL source. The PLSQL source returns a three level hierarchy JSON response based on user inputs start date and end date. At times the JSON body is very large and we want to use pagination for that.

I tried introducing the OFFSET and LIMIT in the json generation code. Snippet below

However putting limit and offset before generating the JSON and shown in comment Line 3 gives me a compile error and putting it in after the where clause in line 10 seems to compile but I still get the entire payload.

The REST definition is somewhat like this from the module section.

See below screenshot, Just need to make pagination work, please advise if I am missing something.

Comments
Post Details
Added on Feb 29 2024
2 comments
353 views