[erlang-questions] pagination and mnesia

Vance Shipley vances@REDACTED
Mon Jun 10 15:52:16 CEST 2019


On Mon, Jun 10, 2019 at 6:46 PM Karlo Kuna <kuna.prime@REDACTED> wrote:
> i was wandering was ti the best way to paginate mnesia table. Problem is hot to get N record from/or up to record X ? I'm interested in ways of doing that without qlc.

Use mnesia:select./4 which takes a Size argument and returns a Continuity.
The trick is to use an ets context, not a transaction.

Here's an example from one of our projects:
https://github.com/sigscale/rim/blob/master/src/im.erl#L167

-- 
     -Vance



More information about the erlang-questions mailing list