@@ -6,7 +6,7 @@ export create_tableiterator, create_columns_from_iterabletable
66
77# T is the type of the elements produced
88# TS is a tuple type that stores the columns of the table
9- immutable TableIterator{T, TS}
9+ struct TableIterator{T, TS}
1010 columns:: TS
1111end
1212
@@ -35,19 +35,19 @@ function create_tableiterator(columns, names::Vector{Symbol})
3535 return e_df
3636end
3737
38- function Base. length {T,TS} (iter:: TableIterator{T,TS} )
38+ function Base. length (iter:: TableIterator{T,TS} ) where {T,TS}
3939 return length (iter. columns[1 ])
4040end
4141
42- function Base. eltype {T,TS} (iter:: TableIterator{T,TS} )
42+ function Base. eltype (iter:: TableIterator{T,TS} ) where {T,TS}
4343 return T
4444end
4545
46- function Base. start {T,TS} (iter:: TableIterator{T,TS} )
46+ function Base. start (iter:: TableIterator{T,TS} ) where {T,TS}
4747 return 1
4848end
4949
50- @generated function Base. next {T,TS} (iter:: TableIterator{T,TS} , state)
50+ @generated function Base. next (iter:: TableIterator{T,TS} , state) where {T,TS}
5151 constructor_call = Expr (:call , :($ T))
5252 for (i,t) in enumerate (T. parameters)
5353 if eltype (iter. parameters[2 ]. parameters[i]) <: Nullable
6565 end
6666end
6767
68- function Base. done {T,TS} (iter:: TableIterator{T,TS} , state)
68+ function Base. done (iter:: TableIterator{T,TS} , state) where {T,TS}
6969 return state> length (iter. columns[1 ])
7070end
7171
0 commit comments