[erlang-questions] pagination and mnesia
Karlo Kuna
kuna.prime@REDACTED
Mon Jun 10 16:59:22 CEST 2019
Thank you Vance this is valuable example,
how does Continuity holds up against changes in table between mnesia:select
calls?
On Mon, Jun 10, 2019 at 3:52 PM Vance Shipley <vances@REDACTED> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190610/2f961150/attachment.htm>
More information about the erlang-questions
mailing list