Functions

Built-in functions

Every Content subclass has the following built-in functions:

Base.lengthFunction
Base.length(parameters::Parameters)
Base.length(layout::PrimitiveArray)
Base.length(layout::EmptyArray)
Base.length(layout::ListOffsetArray)

Length of a ListOffsetArray.

Base.length(layout::ListArray)

Length of a ListArray.

Base.length(layout::RegularArray)

Length of a RegularArray.

Base.length(layout::RecordArray)
Base.length(layout::TupleArray)
Base.length(layout::IndexedArray)
Base.length(layout::IndexedOptionArray)
Base.length(layout::ByteMaskedArray)
Base.length(layout::BitMaskedArray)
Base.length(layout::UnmaskedArray)
Base.length(layout::UnionArray)
Base.sizeFunction

Treat instances of Content as if they are one-dimensional arrays.

Base.firstindexFunction
Base.firstindex(layout::PrimitiveArray)
Base.firstindex(layout::EmptyArray)
Base.firstindex(layout::ListOffsetArray)

First index of a ListOffsetArray offsets.

Base.firstindex(layout::ListArray)

First index of a ListArray starts.

Base.firstindex(layout::RegularArray)

First index of a RegularArray is always 1.

Base.firstindex(layout::RecordArray)
Base.firstindex(layout::TupleArray)
Base.firstindex(layout::IndexedArray)
Base.firstindex(layout::IndexedOptionArray)
Base.firstindex(layout::ByteMaskedArray)
Base.firstindex(layout::BitMaskedArray)
Base.firstindex(layout::UnmaskedArray)
Base.firstindex(layout::UnionArray)
Base.lastindexFunction
Base.lastindex(layout::PrimitiveArray)
Base.lastindex(layout::EmptyArray)
Base.lastindex(layout::ListOffsetArray)

Last index of a ListOffsetArray offsets.

Base.lastindex(layout::ListArray)

Last index of a ListArray starts.

Base.lastindex(layout::RegularArray)

Last index of a RegularArray.

Base.lastindex(layout::RecordArray)
Base.lastindex(layout::TupleArray)
Base.lastindex(layout::IndexedArray)
Base.lastindex(layout::IndexedOptionArray)
Base.lastindex(layout::ByteMaskedArray)
Base.lastindex(layout::BitMaskedArray)
Base.lastindex(layout::UnmaskedArray)
Base.lastindex(layout::UnionArray)
Base.getindexFunction
Base.getindex(layout::PrimitiveArray, i::Int)
Base.getindex(layout::PrimitiveArray, r::UnitRange{Int})
Base.getindex(layout::EmptyArray, i::Int)
Base.getindex(layout::EmptyArray, r::UnitRange{Int})
Base.getindex(layout::ListOffsetArray, i::Int)
Base.getindex(layout::ListOffsetArray, r::UnitRange{Int})
Base.getindex(layout::ListOffsetArray, f::Symbol)
Base.getindex(layout::ListArray, i::Int)
Base.getindex(layout::ListArray, r::UnitRange{Int})
Base.getindex(layout::ListArray, f::Symbol)
Base.getindex(layout::RegularArray, i::Int)
Base.getindex(layout::RegularArray, r::UnitRange{Int})
Base.getindex(layout::RegularArray, f::Symbol)
Base.getindex(
    layout::ListOffsetArray{INDEX,PrimitiveArray{UInt8,BUFFER,:char},:string},
    i::Int,
) where {INDEX<:IndexBig,BUFFER<:AbstractVector{UInt8}}
Base.getindex(
    layout::ListArray{INDEX,PrimitiveArray{UInt8,BUFFER,:char},:string},
    i::Int,
) where {INDEX<:IndexBig,BUFFER<:AbstractVector{UInt8}}
Base.getindex(
    layout::RegularArray{PrimitiveArray{UInt8,BUFFER,:char},:string},
    i::Int,
) where {BUFFER<:AbstractVector{UInt8}}
Base.getindex(
    layout::ListOffsetArray{INDEX,PrimitiveArray{UInt8,BUFFER,:byte},:bytestring},
    i::Int,
) where {INDEX<:IndexBig,BUFFER<:AbstractVector{UInt8}}
Base.getindex(
    layout::ListArray{INDEX,PrimitiveArray{UInt8,BUFFER,:byte},:bytestring},
    i::Int,
) where {INDEX<:IndexBig,BUFFER<:AbstractVector{UInt8}}
Base.getindex(
    layout::RegularArray{PrimitiveArray{UInt8,BUFFER,:byte},:bytestring},
    i::Int,
) where {BUFFER<:AbstractVector{UInt8}}
Base.getindex(
    layout::RecordArray{FIELDS,CONTENTS,BEHAVIOR},
    i::Int,
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}},BEHAVIOR}
Base.getindex(
    layout::RecordArray{FIELDS,CONTENTS,BEHAVIOR},
    r::UnitRange{Int},
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}},BEHAVIOR}
Base.getindex(
    layout::RecordArray{FIELDS,CONTENTS,BEHAVIOR},
    f::Symbol,
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}},BEHAVIOR}
Base.getindex(
    layout::Record{FIELDS,CONTENTS},
    f::Symbol,
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}}}
Base.getindex(
    layout::TupleArray{CONTENTS,BEHAVIOR},
    i::Int,
) where {CONTENTS<:Base.Tuple{Vararg{Content}},BEHAVIOR}
Base.getindex(
    layout::TupleArray{CONTENTS,BEHAVIOR},
    r::UnitRange{Int},
) where {VALUES<:Content,CONTENTS<:Base.Tuple{VALUES},BEHAVIOR}
Base.getindex(
    layout::SlotRecord{CONTENTS},
    f::Int64,
) where {CONTENTS<:Base.Tuple{Vararg{Content}}}
Base.getindex(layout::IndexedArray, i::Int)
Base.getindex(layout::IndexedArray, r::UnitRange{Int})
Base.getindex(layout::IndexedArray, f::Symbol)
Base.getindex(layout::IndexedOptionArray, i::Int)
Base.getindex(layout::IndexedOptionArray, r::UnitRange{Int})
Base.getindex(layout::IndexedOptionArray, f::Symbol)
Base.getindex(layout::ByteMaskedArray, i::Int)
Base.getindex(layout::ByteMaskedArray, r::UnitRange{Int})
Base.getindex(layout::ByteMaskedArray, f::Symbol)
Base.getindex(layout::BitMaskedArray, i::Int)
Base.getindex(layout::BitMaskedArray, r::UnitRange{Int})
Base.getindex(layout::BitMaskedArray, f::Symbol)
Base.getindex(layout::UnmaskedArray, i::Int)
Base.getindex(layout::UnmaskedArray, r::UnitRange{Int})
Base.getindex(layout::UnmaskedArray, f::Symbol)
Base.getindex(layout::UnionArray, i::Int)
Base.getindex(layout::UnionArray, r::UnitRange{Int})
Base.getindex(layout::UnionArray, f::Symbol)
Base.iterateFunction
Base.iterate(layout::Content)

Enable the use of Julia's iteration protocol on instances of Content type.

Examples

# Assuming Content is defined and an instance is created
for element in layout_instance
    println(element)
end

Initialization: The iteration process starts by calling Base.iterate(layout) with the collection layout as the only argument. This should return the first element and the initial state.

Base.iterate(layout::Content, state)

Iteration: The iteration continues by repeatedly calling Base.iterate(layout, state) with the collection and the current state. This returns the next element and the next state until it returns nothing, indicating the end of the iteration.

Parameters

layout::Content: This specifies that the function operates on an instance of the type Content.

state: This represents the current state of the iteration, typically an index or position in the collection.

Base.eltypeFunction
Base.eltype(layout::PrimitiveArray)
Base.eltype(layout::EmptyArray)
Base.eltype(layout::ListType)
Base.eltype(layout::IndexedArray)
Base.eltype(layout::IndexedOptionArray)
Base.eltype(layout::ByteMaskedArray)
Base.eltype(layout::BitMaskedArray)
Base.eltype(layout::UnmaskedArray)
Base.eltype(layout::UnionArray)
Base.:==Function
Base.:(==)(layout1::Content, layout2::Content)

Two Content objects are considered equal only if they have the same elements in the same order.

Base.:(==)(
    layout1::RecordArray{FIELDS,CONTENTS1},
    layout2::RecordArray{FIELDS,CONTENTS2},
) where {
    FIELDS,
    CONTENTS1<:Base.Tuple{Vararg{Content}},
    CONTENTS2<:Base.Tuple{Vararg{Content}},
}
Base.:(==)(
    layout1::Record{FIELDS,CONTENTS1},
    layout2::Record{FIELDS,CONTENTS2},
) where {
    FIELDS,
    CONTENTS1<:Base.Tuple{Vararg{Content}},
    CONTENTS2<:Base.Tuple{Vararg{Content}},
}
Base.:(==)(
    layout1::TupleArray{CONTENTS1},
    layout2::TupleArray{CONTENTS2},
) where {
    N,
    CONTENTS1<:Base.Tuple{Vararg{Content,N}},
    CONTENTS2<:Base.Tuple{Vararg{Content,N}},
}
Base.:(==)(
    layout1::SlotRecord{CONTENTS1},
    layout2::SlotRecord{CONTENTS2},
) where {
    N,
    CONTENTS1<:Base.Tuple{Vararg{Content,N}},
    CONTENTS2<:Base.Tuple{Vararg{Content,N}},
}
Base.push!Function
Base.push!(layout::PrimitiveArray{ITEM}, input::ITEM) where {ITEM}

Push multiple ITEM elements (from another collection) to an instance of PrimitiveArray.

Base.push!(layout::PrimitiveArray{ITEM}, input::Number) where {ITEM}
Base.push!(layout::EmptyArray, input)
Base.push!(layout::ListType{BEHAVIOR}, input::String) where {BEHAVIOR}
Base.push!(layout::ListType, input::AbstractVector)
Base.push!(
    layout::RecordArray{FIELDS,CONTENTS},
    input::NamedTuple{FIELDS},
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}}}
Base.push!(
    layout::TupleArray{CONTENTS},
    input::INPUT,
) where {N,CONTENTS<:Base.Tuple{Vararg{Content,N}},INPUT<:Base.Tuple{Vararg{Any,N}}}
Base.push!(layout::IndexedArray, input)
Base.push!(layout::IndexedOptionArray, input)
Base.push!(layout::ByteMaskedArray, input)
Base.push!(layout::BitMaskedArray, input)
Base.push!(layout::UnmaskedArray, input)
Base.push!(special::Specialization, input)
Base.push!(layout::UnionArray, input)
Base.append!Function
Base.append!(layout::Content, input)

Append multiple elements (from another collection) to an instance of Content.

Base.append!(layout::OptionType, input)

Appending elements to an array of type OptionType, handling missing values.

Base.append!(special::Specialization, input)
Base.showFunction
Base.show(io::IO, parameters::Parameters)
Base.show(
    io::IO,
    data::Union{Content,Record,Tuple};
    limit_rows::Int = 1,
    limit_cols::Int = 80,
)
Base.show(data::Union{Content,Record,Tuple}; limit_rows::Int = 1, limit_cols::Int = 80)
Base.keysFunction
Base.keys(parameters::Parameters)

Manipulating and checking structure

Every Content subclass has the following functions for manipulating and checking structure:

AwkwardArray.parameters_ofFunction
parameters_of(content::CONTENT) where {CONTENT<:Content}

Return a list of all parameters.

parameters_of(content::EmptyArray)
AwkwardArray.has_parameterFunction
has_parameter(parameters::Parameters, key::String)
has_parameter(content::CONTENT, key::String) where {CONTENT<:Content}

Return true if a parameter exists.

has_parameter(content::EmptyArray, key::String)
AwkwardArray.get_parameterFunction
get_parameter(parameters::Parameters, key::String)
get_parameter(content::CONTENT, key::String) where {CONTENT<:Content}

Return a parameter or raises an error.

get_parameter(content::EmptyArray, key::String)
AwkwardArray.with_parameterFunction
with_parameter(parameters::Parameters, pair::Pair{String,String})
with_parameter(parameters::Parameters, pair::Pair{String,<:Any})
AwkwardArray.copyFunction
copy(
    layout::PrimitiveArray{ITEM,BUFFER1,BEHAVIOR};
    data::Union{Unset,BUFFER2} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {ITEM,BUFFER1<:AbstractVector{ITEM},BUFFER2<:AbstractVector,BEHAVIOR}
copy(behavior::Union{Unset,Symbol} = Unset())
copy(
    layout::ListOffsetArray{INDEX1,CONTENT1,BEHAVIOR};
    offsets::Union{Unset,INDEX2} = Unset(),
    content::Union{Unset,CONTENT2} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {INDEX1<:IndexBig,INDEX2<:IndexBig,CONTENT1<:Content,CONTENT2<:Content,BEHAVIOR}

Copy of a ListOffsetArray.

copy(
    layout::ListArray{INDEX1,CONTENT1,BEHAVIOR};
    starts::Union{Unset,INDEX2} = Unset(),
    stops::Union{Unset,INDEX2} = Unset(),
    content::Union{Unset,CONTENT2} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {INDEX1<:IndexBig,INDEX2<:IndexBig,CONTENT1<:Content,CONTENT2<:Content,BEHAVIOR}

Copy of a ListArray.

copy(
    layout::RegularArray{CONTENT1,BEHAVIOR};
    content::Union{Unset,CONTENT2} = Unset(),
    size::Union{Unset,Int} = Unset(),
    zeros_length::Union{Unset,Int} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {CONTENT1<:Content,CONTENT2<:Content,BEHAVIOR}

Copy of a RegularArray.

copy(
    layout::RecordArray{FIELDS1,CONTENTS1,BEHAVIOR};
    contents::Union{Unset,NamedTuple{FIELDS2,CONTENTS2}} = Unset(),
    length::Union{Unset,Int64} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {
    FIELDS1,
    FIELDS2,
    CONTENTS1<:Base.Tuple{Vararg{Content}},
    CONTENTS2<:Base.Tuple{Vararg{Content}},
    BEHAVIOR,
}
copy(
    layout::TupleArray{CONTENTS1,BEHAVIOR};
    contents::Union{Unset,CONTENTS2} = Unset(),
    length::Union{Unset,Int64} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {
    CONTENTS1<:Base.Tuple{Vararg{Content}},
    CONTENTS2<:Base.Tuple{Vararg{Content}},
    BEHAVIOR,
}
copy(
    layout::IndexedArray{INDEX1,CONTENT1,BEHAVIOR};
    index::Union{Unset,INDEX2} = Unset(),
    content::Union{Unset,CONTENT2} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {INDEX1<:IndexBig,INDEX2<:IndexBig,CONTENT1<:Content,CONTENT2<:Content,BEHAVIOR}
copy(
    layout::IndexedOptionArray{INDEX1,CONTENT1,BEHAVIOR};
    index::Union{Unset,INDEX2} = Unset(),
    content::Union{Unset,CONTENT2} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {
    INDEX1<:IndexBigSigned,
    INDEX2<:IndexBigSigned,
    CONTENT1<:Content,
    CONTENT2<:Content,
    BEHAVIOR,
}

Copy of an IndexedOptionArray, potentially with some modifications to its fields.

copy(
    layout::ByteMaskedArray{INDEX1,CONTENT1,BEHAVIOR};
    mask::Union{Unset,INDEX2} = Unset(),
    content::Union{Unset,CONTENT2} = Unset(),
    valid_when::Union{Unset,Bool} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {INDEX1<:IndexBool,INDEX2<:IndexBool,CONTENT1<:Content,CONTENT2<:Content,BEHAVIOR}
copy(
    layout::BitMaskedArray{CONTENT1,BEHAVIOR};
    mask::Union{Unset,BitVector} = Unset(),
    content::Union{Unset,CONTENT2} = Unset(),
    valid_when::Union{Unset,Bool} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {CONTENT1<:Content,CONTENT2<:Content,BEHAVIOR}
copy(
    layout::UnmaskedArray{CONTENT1,BEHAVIOR};
    content::Union{Unset,CONTENT2} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
) where {CONTENT1<:Content,CONTENT2<:Content,BEHAVIOR}
copy(
    layout::UnionArray{TAGS1,INDEX1,CONTENTS1,BEHAVIOR};
    tags::Union{Unset,TAGS2} = Unset(),
    index::Union{Unset,INDEX2} = Unset(),
    contents::Union{Unset,CONTENTS2} = Unset(),
    parameters::Union{Unset,Parameters} = Unset(),
    behavior::Union{Unset,Symbol} = Unset(),
)
AwkwardArray.is_validFunction
is_valid(layout::PrimitiveArray)
is_valid(layout::EmptyArray)
is_valid(layout::ListOffsetArray)

Check if a ListOffsetArray is valid.

is_valid(layout::ListArray)

Check if a ListArray is valid.

is_valid(layout::RegularArray)

Check if a RegularArray is valid.

is_valid(layout::RecordArray)
is_valid(layout::TupleArray)
is_valid(layout::IndexedArray)
is_valid(layout::IndexedOptionArray)
is_valid(layout::ByteMaskedArray)
is_valid(layout::BitMaskedArray)
is_valid(layout::UnmaskedArray)
is_valid(layout::UnionArray)

Filling an array

Every Content subclass has the following functions for filling an array:

AwkwardArray.end_list!Function
end_list!(layout::ListOffsetArray)
end_list!(layout::ListArray)
end_list!(layout::RegularArray)
end_list!(layout::IndexedArray)
end_list!(layout::IndexedOptionArray)
end_list!(layout::ByteMaskedArray)
end_list!(layout::BitMaskedArray)
end_list!(layout::UnmaskedArray)
end_list!(special::Specialization)
AwkwardArray.end_record!Function
end_record!(layout::RecordArray)
end_record!(layout::IndexedArray)
end_record!(layout::IndexedOptionArray)
end_record!(layout::ByteMaskedArray)
end_record!(layout::BitMaskedArray)
end_record!(layout::UnmaskedArray)
end_record!(special::Specialization)
AwkwardArray.end_tuple!Function
end_tuple!(layout::TupleArray)
end_tuple!(layout::IndexedArray)
end_tuple!(layout::IndexedOptionArray)
end_tuple!(layout::ByteMaskedArray)
end_tuple!(layout::BitMaskedArray)
end_tuple!(layout::UnmaskedArray)
end_tuple!(special::Specialization)
AwkwardArray.push_null!Function
push_null!(layout::IndexedOptionArray)
push_null!(layout::ByteMaskedArray)
push_null!(layout::BitMaskedArray)
push_null!(
    special::Specialization{ARRAY,TAGGED},
) where {ARRAY<:UnionArray,TAGGED<:OptionType}
AwkwardArray.push_dummy!Function
push_dummy!(layout::PrimitiveArray{ITEM}) where {ITEM}
push_dummy!(layout::ListOffsetArray)
push_dummy!(layout::ListArray)
push_dummy!(layout::RegularArray)
push_dummy!(layout::RecordArray)
push_dummy!(layout::TupleArray)
push_dummy!(layout::IndexedArray)
push_dummy!(layout::IndexedOptionArray)
push_dummy!(layout::ByteMaskedArray)
push_dummy!(layout::BitMaskedArray)
push_dummy!(layout::UnmaskedArray)
push_dummy!(special::Specialization)

Selecting fields

RecordArrayand TupleArray have the following for selecting fields (as opposed to rows):

AwkwardArray.slotFunction
slot(
    layout::RecordArray{FIELDS,CONTENTS,BEHAVIOR},
    f::Symbol,
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}},BEHAVIOR}
slot(
    layout::TupleArray{CONTENTS,BEHAVIOR},
    f::Int,
) where {CONTENTS<:Base.Tuple{Vararg{Content}},BEHAVIOR}

Specializations

UnionArrayhas the following for dealing with specializations:

Convertion

Finally, all Contentsubclasses can be converted with the following:

AwkwardArray.to_vectorFunction
to_vector(layout::Content; view::Bool = false, na::Union{Missing,Nothing} = missing)
to_vector(
    record::Record{FIELDS,CONTENTS};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}}} = NamedTuple{FIELDS}
to_vector(
    tuple::Tuple{CONTENTS};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {CONTENTS<:Base.Tuple{Vararg{Content}}}
to_vector(
    layout::PrimitiveArray{ITEM},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {ITEM}
to_vector(
    layout::EmptyArray,
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
)
to_vector(
    layout::ListOffsetArray{INDEX,CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {INDEX<:IndexBig,CONTENT<:Content}
to_vector(
    layout::ListArray{INDEX,CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {INDEX<:IndexBig,CONTENT<:Content}
to_vector(
    layout::RegularArray{CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {CONTENT<:Content}
to_vector(
    layout::ListOffsetArray{INDEX,PrimitiveArray{UInt8,BUFFER,:char},:string},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {INDEX<:IndexBig,BUFFER<:AbstractVector{UInt8}}
to_vector(
    layout::ListArray{INDEX,PrimitiveArray{UInt8,BUFFER,:char},:string},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {INDEX<:IndexBig,BUFFER<:AbstractVector{UInt8}}
to_vector(
    layout::RegularArray{PrimitiveArray{UInt8,BUFFER,:char},:string},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {BUFFER<:AbstractVector{UInt8}}
to_vector(
    layout::RecordArray{FIELDS,CONTENTS},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}}}
to_vector(
    layout::TupleArray{CONTENTS},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {CONTENTS<:Base.Tuple{Vararg{Content}}}
to_vector(
    layout::IndexedArray{INDEX,CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {INDEX<:IndexBig,CONTENT<:Content}
to_vector(
    layout::IndexedOptionArray{INDEX,CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {INDEX<:IndexBig,CONTENT<:Content}
to_vector(
    layout::ByteMaskedArray{INDEX,CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {INDEX<:IndexBool,CONTENT<:Content}
to_vector(
    layout::BitMaskedArray{CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {CONTENT<:Content}
to_vector(
    layout::UnmaskedArray{CONTENT},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {CONTENT<:Content}
to_vector(
    layout::UnionArray{TAGS,INDEX,CONTENTS},
    r::UnitRange{Int};
    view::Bool = false,
    na::Union{Missing,Nothing} = missing,
) where {TAGS<:Index8,INDEX<:IndexBig,CONTENTS<:Base.Tuple}
AwkwardArray.to_vector_or_scalarFunction
to_vector_or_scalar(x::Content; view::Bool = false, na::Union{Missing,Nothing} = missing)
to_vector_or_scalar(x; view::Bool = false, na = missing)
AwkwardArray.from_buffersFunction
from_buffers(
    form::String,
    length::Int,
    containers::Dict{String,BUFFER};
    buffer_key::BUFFER_KEY_FUNCTION = default_buffer_key,
) where {BUFFER<:AbstractVector{UInt8},BUFFER_KEY_FUNCTION<:Function}
from_buffers(
    form::Dict{String,Any},
    length::Int,
    containers::Dict{String,BUFFER};
    buffer_key::BUFFER_KEY_FUNCTION = default_buffer_key,
) where {BUFFER<:AbstractVector{UInt8},BUFFER_KEY_FUNCTION<:Function}

Arrays of Stings

AwkwardArray.ByteStringOffsetArrayFunction
ByteStringOffsetArray(
    offsets::INDEX,
    data::AbstractVector{UInt8};
    parameters::Parameters = Parameters(),
    byte_parameters::Parameters = Parameters(),
) where {INDEX<:IndexBig}

The function that constructs a specialized array type for handling byte strings with specific offsets.

  • offsets: This is an array of indices (INDEX) which determines where each string starts within the byte array.
  • data: This is a vector of UInt8 (unsigned 8-bit integers), representing the raw bytes of the strings.
  • parameters: Optional parameters for configuring the ListOffsetArray.
  • byte_parameters: Optional parameters specifically for the PrimitiveArray holding the byte data.
  • INDEX<: Ensures that offsets is a subtype of IndexBig, which typically implies a larger indexing type suitable for big data.
Note

It is a ListType with behavior = :bytestring.

ByteStringOffsetArray(;
    parameters::Parameters = Parameters(),
    byte_parameters::Parameters = Parameters(),
)

A default constructor that initializes an empty ByteStringOffsetArray.

AwkwardArray.ByteStringArrayFunction
ByteStringArray(
    starts::INDEX,
    stops::INDEX,
    data::AbstractVector{UInt8};
    parameters::Parameters = Parameters(),
    byte_parameters::Parameters = Parameters(),
) where {INDEX<:IndexBig}

The ByteStringArray function constructs a specialized array type for handling byte strings, similar to ByteStringOffsetArray, but it uses separate starts and stops indices rather than a single offsets array.

ByteStringArray(;
    parameters::Parameters = Parameters(),
    byte_parameters::Parameters = Parameters(),
)

A default constructor that initializes an empty ByteStringArray.

AwkwardArray.ByteStringRegularArrayFunction
ByteStringRegularArray(
    data::AbstractVector{UInt8},
    size::Int;
    zeros_length::Int = 0,
    parameters::Parameters = Parameters(),
    byte_parameters::Parameters = Parameters(),
)
ByteStringRegularArray(
    size::Int;
    parameters::Parameters = Parameters(),
    byte_parameters::Parameters = Parameters(),
)
ByteStringRegularArray(;
    parameters::Parameters = Parameters(),
    byte_parameters::Parameters = Parameters(),
)
AwkwardArray.StringArrayFunction
StringArray(
    starts::INDEX,
    stops::INDEX,
    data::AbstractVector{UInt8};
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
) where {INDEX<:IndexBig}
StringArray(
    starts::INDEX,
    stops::INDEX,
    data::String;   # data provided as a String, rather than AbstractVector{UInt8}
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
) where {INDEX<:IndexBig}
StringArray(;
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
)
AwkwardArray.StringOffsetArrayFunction
StringOffsetArray(
    offsets::INDEX,
    data::AbstractVector{UInt8};
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
) where {INDEX<:IndexBig}
StringOffsetArray(
    offsets::INDEX,
    data::String;
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
) where {INDEX<:IndexBig}
StringOffsetArray(; parameters = Parameters(), char_parameters = Parameters())
AwkwardArray.StringRegularArrayFunction
StringRegularArray(
    data::AbstractVector{UInt8},
    size::Int;
    zeros_length::Int = 0,
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
)
StringRegularArray(
    data::String,
    size::Int;
    zeros_length::Int = 0,
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
)
StringRegularArray(
    size::Int;
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
)
StringRegularArray(;
    parameters::Parameters = Parameters(),
    char_parameters::Parameters = Parameters(),
)

Utilities

AwkwardArray.isprimitiveFunction
isprimitive(t::Type)

Determine if a given type is one of the fundamental data types in Julia that are typically considered primitive. These include:

Integer: Represents all integer types (e.g., Int64, UInt8). AbstractFloat: Represents all floating-point types (e.g., Float64, Float32). Bool: Represents boolean values (true and false). Char: Represents character values.

AwkwardArray.check_primitive_typeFunction
check_primitive_type(ITEM)

A utility that provides a string representation for various primitive types in Julia. It helps in identifying the type of an item and mapping it to a human-readable format. This is useful in scenarios where type information needs to be logged, serialized, or displayed. If a type is not recognized, it defaults to returning unknown.

Private functions

AwkwardArray._get_bufferFunction
_get_buffer(
    form_key::Union{Nothing,String},
    attribute::String,
    buffer_key::BUFFER_KEY_FUNCTION,
    containers::Dict{String,BUFFER},
) where {BUFFER<:AbstractVector{UInt8},BUFFER_KEY_FUNCTION<:Function}
AwkwardArray._get_indexFunction
_get_index(
    form_snippet::String,
    length::Int64,
    buffer::BUFFER,
) where {BUFFER<:AbstractVector{UInt8}}
AwkwardArray._to_buffers!Function
_to_buffers!(
    layout::PrimitiveArray{ITEM,BUFFER},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {ITEM,BUFFER<:AbstractVector{ITEM}}
_to_buffers!(
    layout::EmptyArray,
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
)
_to_buffers!(
    layout::ListOffsetArray{INDEX,CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {INDEX<:IndexBig,CONTENT<:Content}
_to_buffers!(
    layout::ListArray{INDEX,CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {INDEX<:IndexBig,CONTENT<:Content}
_to_buffers!(
    layout::RegularArray{CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {CONTENT<:Content}
_to_buffers!(
    layout::RecordArray{FIELDS,CONTENTS},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}}}
_to_buffers!(
    layout::TupleArray{CONTENTS},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {CONTENTS<:Base.Tuple{Vararg{Content}}}
_to_buffers!(
    layout::IndexedArray{INDEX,CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {INDEX<:IndexBig,CONTENT<:Content}
_to_buffers!(
    layout::IndexedOptionArray{INDEX,CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {INDEX<:IndexBigSigned,CONTENT<:Content}
_to_buffers!(
    layout::ByteMaskedArray{INDEX,CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {INDEX<:IndexBool,CONTENT<:Content}
_to_buffers!(
    layout::BitMaskedArray{CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {CONTENT<:Content}
_to_buffers!(
    layout::UnmaskedArray{CONTENT},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {CONTENT<:Content}
_to_buffers!(
    layout::UnionArray{TAGS,INDEX,CONTENTS},
    number::Vector{Int64},
    containers::Dict{String,AbstractVector{UInt8}},
) where {TAGS<:Index8,INDEX<:IndexBig,CONTENTS<:Base.Tuple{Vararg{Content}}}
AwkwardArray._verticalFunction
_vertical(data::Union{Content,Record,Tuple}, limit_rows::Int, limit_cols::Int)

Index