Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8078

Re: How do you write your EntitySet Paging?

$
0
0

I'll start by answering my own question, hopefully it gives context into why i am asking.

 

I have and use 3 different techniques

 

1. SELECT UP lv_max ROWS.  DELETE it_tab TO iv_skip

lv_max = $top + $skip

 

2. Use CURSORS, similar Open SQL to above but use OPEN CURSOR, FETCH NEXT CURSOR etc. to control which entries are returned   

 

3. Use Native SQL,  CL_SQL_STATEMENT with SELECT LIMIT $top OFFSET $skip

 

Option 1 has some limits when it comes sub queries and joins, but is easy to read debug and understand as its Open SQL

 

Option 2 is easy to read and understand but remember having issues getting customers to adopt, especially if there are SLA's around Cursors etc.

 

Option 3 the scope of what you can do increases, which makes it harder to understand, maintain and re-factor and debug, but I see as probably the best option as we should adopting more SQL and pushing down our code to the DB anyway

 

hopefully you see the reason why i am asking the question now, multiple ways to solve the same problem, which should be adopted as a standard and why?

 

JSP


Viewing all articles
Browse latest Browse all 8078

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>