Chains
DataAxesFormats.Chains
—
Module
View a chain of
Daf
data as a single data set. This allows creating a small
Daf
data set that contains extra (or overriding) data on top of a larger read-only data set. In particular this allows creating several such incompatible extra data sets (e.g., different groupings of cells to metacells), without having to duplicate the common (read only) data.
DataAxesFormats.Chains.chain_reader
—
Function
chain_reader(dafs::AbstractVector{<:DafReader}; name::Maybe{AbstractString} = nothing)::DafReader
Create a read-only chain wrapper of
DafReader
s, presenting them as a single
DafReader
. When accessing the content, the exposed value is that provided by the last data set that contains the data, that is, later data sets can override earlier data sets. However, if an axis exists in more than one data set in the chain, then its entries must be identical. This isn't typically created manually; instead call
chain_reader
.
While this verifies the axes are consistent at the time of creating the chain, it's no defense against modifying the chained data after the fact, creating inconsistent axes. Don't do that .
DataAxesFormats.Chains.chain_writer
—
Function
chain_writer(dafs::AbstractVector{<:DafReader}; name::Maybe{AbstractString} = nothing)::DafWriter
Create a chain wrapper for a chain of
DafReader
data, presenting them as a single
DafWriter
. This acts similarly to
chain_reader
, but requires the final entry in the chain to be a
DafWriter
. Any modifications or additions to the chain are directed only at this final writer.
Deletions are only allowed for data that exists only in the final writer. That is, it is impossible to delete from a chain something that exists in any of the readers; it is only possible to override it.
DataAxesFormats.Chains.ReadOnlyChain
—
Type
struct ReadOnlyChain <: DafReadOnly ... end
A wrapper for a chain of
DafReader
data, presenting them as a single
DafReadOnly
. When accessing the content, the exposed value is that provided by the last data set that contains the data, that is, later data sets can override earlier data sets. However, if an axis exists in more than one data set in the chain, then its entries must be identical. This isn't typically created manually; instead call
chain_reader
.
DataAxesFormats.Chains.WriteChain
—
Type
struct WriteChain <: DafWriter ... end
A wrapper for a chain of
DafReader
data, with a final
DafWriter
, presenting them as a single
DafWriter
. When accessing the content, the exposed value is that provided by the last data set that contains the data, that is, later data sets can override earlier data sets (where the writer has the final word). However, if an axis exists in more than one data set in the chain, then its entries must be identical. This isn't typically created manually; instead call
chain_reader
.
Any modifications or additions to the chain are directed at the final writer. Deletions are only allowed for data that exists only in this writer. That is, it is impossible to delete from a chain something that exists in any of the readers; it is only possible to override it.