phasedb v0.0.2 PhaseDB.Cursor protocol

Implements the basic API for dealing with series cursors (basically connections to various storage systems).

To implement a storage system for PhaseDB you need to implement the following protocols:

  • PhaseDB.Cursor
  • PhaseDB.GarbageCollectable
  • PhaseDB.Insertable
  • PhaseDB.Selectable

Also, if you implement Enumerable you'll find it easier to debug.

Summary

Functions

Returns true if the cursor refers to a working storage system

Remove this cursor's storage system

Return the range of the series

Return the resolution of the series

Types

t :: Cursor.t

Functions

alive?(cursor)

Specs

alive?(t) :: boolean

Returns true if the cursor refers to a working storage system

drop(cursor)

Specs

drop(t) :: :ok

Remove this cursor's storage system

range(cursor)

Specs

range(t) :: non_neg_integer | nil

Return the range of the series

resolution(cursor)

Specs

resolution(t) :: non_neg_integer

Return the resolution of the series