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
There may be times when data needs to be scanned as reversed. Currently there is no specific interface defined, but can using with reversed Sort orders.
RDBMS: supported partially or with sort
NoSQL:
mongoDb: supported by sort
Apache HBase: supported by scanner level
Google Bigtable: not supported
What is the expected result?
$reader->withReverseScanning()->read();
condition of data reader
result
if supported it, or partially supported
scanning in reverse mode
if not supported it, but supported sorting
reverses sorting immediately before scanning
If not supported it
throw exception, or implement it at PHP level after reading the data, if possible.
examples:
if supported it or partially supported
SELECT*FROM (
SELECT*FROM ...
WHERE id > :first
ORDER BY id DESC
) ORDER BY id ASCLIMIT3-- this is not real reverse scanning
if not supported it, but supported sorting
exmaple in IteratorDataReader
If not supported it
Depending on the number of data, use the array_reverse() function, but for example, if the number of data can be hundreds of millions, can decide to throw an exception based on the withLimit(). (typically with noSQL)
Yes, she came up with the Paginator. Unnecessary abstraction. I thought the DataReader layer is easier to handle reverse scanning if this is supported or not.
What steps will reproduce the problem?
There may be times when data needs to be scanned as reversed. Currently there is no specific interface defined, but can using with reversed
Sort
orders.What is the expected result?
implement it at PHP level after reading the data, if possible.
examples:
exmaple in
IteratorDataReader
Depending on the number of data, use the
array_reverse()
function, but for example, if the number of data can be hundreds of millions, can decide to throw an exception based on thewithLimit()
. (typically with noSQL)What do you get instead?
data/src/Paginator/KeysetPaginator.php
Lines 70 to 75 in 992a8bc
Additional info
Also consider giving
Sort
awithInversed()
orwithReverseSorting()
method.The text was updated successfully, but these errors were encountered: