View Source Electric.Shapes (electric v1.0.1)
Summary
Functions
Clean up all data (meta data and shape log + snapshot) associated with the given shape handle
Get the last exclusive offset of the chunk starting from the given offset
Get the snapshot followed by the log.
Get or create a shape handle and return it along with the latest offset of the shape
Get the shape that corresponds to this shape definition and return it along with the latest offset of the shape
Check whether the log has an entry for a given shape handle
Types
@type shape_handle() :: Electric.ShapeCacheBehaviour.shape_handle()
Functions
@spec clean_shape(shape_handle(), Access.t()) :: :ok
Clean up all data (meta data and shape log + snapshot) associated with the given shape handle
@spec clean_shapes([shape_handle()], Access.t()) :: :ok
@spec get_chunk_end_log_offset( Access.t(), shape_handle(), Electric.Replication.LogOffset.t() ) :: Electric.Replication.LogOffset.t() | nil
Get the last exclusive offset of the chunk starting from the given offset
If nil
is returned, chunk is not complete and the shape's latest offset should be used
Get the snapshot followed by the log.
@spec get_or_create_shape_handle(Access.t(), Electric.Shapes.Shape.t()) :: {shape_handle(), Electric.Replication.LogOffset.t()}
Get or create a shape handle and return it along with the latest offset of the shape
@spec get_shape(Access.t(), Electric.Shapes.Shape.t()) :: {shape_handle(), Electric.Replication.LogOffset.t()} | nil
Get the shape that corresponds to this shape definition and return it along with the latest offset of the shape
@spec has_shape?(Access.t(), shape_handle()) :: boolean()
Check whether the log has an entry for a given shape handle