Oracle Magazine, July/August 2019
Database Developer PL SQL ORACLE MAGAZINE JULY AUGUST 2019 113 Content myIndex 50 myValue Even Content myIndex 2 myValue Even Content myIndex 60 myValue Even But wait Why dont I see 51 through 55 Thats because results are ordered only by the document key values which are by default generated automatically unless skip or limit appears in method calls If you need to change the ordering use the filter method and specify an orderby In the block below I order by the myIndex value I specify that the datatype is a number to ensure the correct ordering it will otherwise be treated as a string DECLARE l_ collection soda_ collection_ t l_ document soda_ document_ t l_ cursor soda_ cursor_ t l_ status BOOLEAN BEGIN l_ collection dbms_ soda open_ collection SillyCollection l_ cursor l_ collection find filter orderby path myIndex datatype number order asc skip 50 limit 5 get_ cursor WHILE l_ cursor has_ next LOOP l_ document l_ cursor NEXT
You must have JavaScript enabled to view digital editions.