You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A CURSOR would allow us to paginate really large collections.
I've never implemented or even really used these directly, but I found this example
-- We must be in a transactionBEGIN;
-- Open a cursor for a query
DECLARE medley_cur CURSOR FOR SELECT*FROM medley;
-- Retrieve ten rows
FETCH 10FROM medley_cur;
-- ...-- Retrieve ten more from where we left off
FETCH 10FROM medley_cur;
-- All doneCOMMIT;
I honestly have no clue how this will work, but I think we would probably want some alternate method of iterating that appends the cursor to the query?
UserQuery.new.each_with_cursor(fetch:10) do |user|
#??endUserQuery.new.cursor_fetch(10).each do |user|
end
If anyone has any ideas around this, I'm open.
The text was updated successfully, but these errors were encountered:
A
CURSOR
would allow us to paginate really large collections.I've never implemented or even really used these directly, but I found this example
I honestly have no clue how this will work, but I think we would probably want some alternate method of iterating that appends the cursor to the query?
If anyone has any ideas around this, I'm open.
The text was updated successfully, but these errors were encountered: