Skip to content

Commit

Permalink
Project updates
Browse files Browse the repository at this point in the history
  • Loading branch information
raphasampaio committed Sep 20, 2024
1 parent b64c89b commit fe57905
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/data/vector_map.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,43 @@
data::Vector{Vector{Int}} = []
end

function Base.convert(::Type{MapData}, tuple::Tuple{String, String})
return MapData(collection_to = tuple[1], id = tuple[2])
function Base.convert(::Type{VectorMapData}, tuple::Tuple{String, String})
return VectorMapData(collection_to = tuple[1], id = tuple[2])
end

function Base.getindex(parameter::MapData, i::Integer)
function Base.getindex(parameter::VectorMapData, i::Integer)
return parameter.data[i]
end

function Base.length(parameter::MapData)
function Base.length(parameter::VectorMapData)
return length(parameter.data)
end

function Base.isempty(parameter::MapData)
function Base.isempty(parameter::VectorMapData)
return isempty(parameter.data)
end

function Base.iterate(parameter::MapData)
function Base.iterate(parameter::VectorMapData)
return iterate(parameter.data)
end

function Base.iterate(parameter::PSRBridge.MapData, i::Integer)
function Base.iterate(parameter::PSRBridge.VectorMapData, i::Integer)
return iterate(parameter.data, i)
end

function raw_data(parameter::MapData)
function raw_data(parameter::VectorMapData)
return parameter.data
end

function initialize!(parameter::MapData, collection::AbstractCollection, db::DatabaseSQLite; kwargs...)
function initialize!(parameter::VectorMapData, collection::AbstractCollection, db::DatabaseSQLite; kwargs...)
parameter.data = PSRI.get_vector_map(inputs.db, collection.id, parameter.collection_to, parameter.id)
return nothing
end

function update!(parameter::MapData, collection::AbstractCollection, db::DatabaseSQLite; kwargs...)
function update!(parameter::VectorMapData, collection::AbstractCollection, db::DatabaseSQLite; kwargs...)
return nothing
end

function finalize!(parameter::MapData)
function finalize!(parameter::VectorMapData)
return nothing
end

0 comments on commit fe57905

Please sign in to comment.