function Base.getproperty()

in src/metadata/Schema.jl [617:653]


function Base.getproperty(x::Field, field::Symbol)
    if field === :name
        o = FlatBuffers.offset(x, 4)
        o != 0 && return String(x, o + FlatBuffers.pos(x))
    elseif field === :nullable
        o = FlatBuffers.offset(x, 6)
        o != 0 && return FlatBuffers.get(x, o + FlatBuffers.pos(x), Base.Bool)
        return false
    elseif field === :type
        o = FlatBuffers.offset(x, 8)
        if o != 0
            T = Type(FlatBuffers.get(x, o + FlatBuffers.pos(x), UInt8))
            o = FlatBuffers.offset(x, 10)
            pos = FlatBuffers.union(x, o)
            if o != 0
                return FlatBuffers.init(T, FlatBuffers.bytes(x), pos)
            end
        end
    elseif field === :dictionary
        o = FlatBuffers.offset(x, 12)
        if o != 0
            y = FlatBuffers.indirect(x, o + FlatBuffers.pos(x))
            return FlatBuffers.init(DictionaryEncoding, FlatBuffers.bytes(x), y)
        end
    elseif field === :children
        o = FlatBuffers.offset(x, 14)
        if o != 0
            return FlatBuffers.Array{Field}(x, o)
        end
    elseif field === :custom_metadata
        o = FlatBuffers.offset(x, 16)
        if o != 0
            return FlatBuffers.Array{KeyValue}(x, o)
        end
    end
    return nothing
end