Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Fixes for v0.5 (#10)
Browse files Browse the repository at this point in the history
* Fixes for v0.5

* Add v0.5 to Travis

* Add Compat to REQUIRE
  • Loading branch information
ranjanan authored Sep 21, 2016
1 parent 67afa1e commit 5401f42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ os:
- osx
julia:
- 0.4
- 0.5
- nightly
notifications:
email: false
Expand Down
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
julia 0.4
Reexport
Iterators
Compat 0.8.4
10 changes: 9 additions & 1 deletion src/arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module ArrayInterfaces

import Base: connect, close, getindex, start, next, done, length, isopen, isempty
importall ..DBAPIBase
import Compat.view


### Underlying column data structures
Expand All @@ -18,7 +19,7 @@ immutable SubColumn{T} <: AbstractColumn{T}
data::SubArray{T}
end

SubColumn(column::Column, indices...) = SubColumn(column.name, sub(column.data, indices...))
SubColumn(column::Column, indices...) = SubColumn(column.name, view(column.data, indices...))

start(column::AbstractColumn) = start(column.data)
next{T}(column::AbstractColumn{T}, state) = next(column.data, state)::Tuple{T, Any}
Expand Down Expand Up @@ -237,4 +238,11 @@ immutable ArrayInterfaceError{T<:AbstractString} <: DatabaseError{ColumnarArrayI
message::T
end

if VERSION >= v"0.5-"
Base.iteratorsize(::ColumnarArrayRowIterator) = Base.SizeUnknown()
Base.iteratoreltype(::ColumnarArrayRowIterator) = Base.EltypeUnknown()
Base.iteratorsize(::ColumnarArrayColumnIterator) = Base.SizeUnknown()
Base.iteratoreltype(::ColumnarArrayColumnIterator) = Base.EltypeUnknown()
end

end # module

0 comments on commit 5401f42

Please sign in to comment.