historian v0.11.0-beta.3 Historian.PageBuffer View Source

A buffer to manage paging your history... by "snapshotting" when the buffer was created.

Link to this section Summary

Link to this section Types

Link to this type

page_result()

View Source
page_result() ::
  {:ok, Historian.History.t(Historian.History.Item.t())} | {:ok, :done}
Link to this type

t()

View Source
t() :: %Historian.PageBuffer{
  item_count: non_neg_integer(),
  offset: non_neg_integer(),
  page: non_neg_integer(),
  page_size: pos_integer(),
  ref: reference(),
  table: pos_integer(),
  total_pages: non_neg_integer()
}

Link to this section Functions

Link to this function

current(pager)

View Source
current(page_buffer_pid :: pid()) :: page_result()
Link to this function

first(pager)

View Source
first(page_buffer_pid :: pid()) :: page_result()
Link to this function

get(pager, page_number)

View Source
get(page_buffer_pid :: pid(), non_neg_integer()) :: page_result()
Link to this function

get_line(pager, line_number)

View Source
get_line(page_buffer_pid :: pid(), line_number :: non_neg_integer()) ::
  {:ok, Historian.History.Item.t() | nil}
Link to this function

handle_call(arg1, from, state)

View Source
Link to this function

handle_continue(atom, state)

View Source
Link to this function

info(pager)

View Source
info(page_buffer_pid :: pid()) :: t()
Link to this function

last(pager)

View Source
last(page_buffer_pid :: pid()) :: page_result()
Link to this function

next(pager)

View Source
next(page_buffer_pid :: pid()) :: page_result()
Link to this function

prev(pager)

View Source
prev(page_buffer_pid :: pid()) :: page_result()
Link to this function

set_page(pager, page)

View Source
set_page(page_buffer_pid :: pid(), non_neg_integer()) :: page_result()
Link to this function

start_link(page_size, opts \\ [])

View Source