Skip to content

Commit ca1b2e5

Browse files
committed
Add convert(::Type{Matrix},::ResultSet) for convenience
1 parent 8d2f23a commit ca1b2e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SQLite.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ end
2020
include("consts.jl")
2121
include("api.jl")
2222

23-
2423
# Custom NULL type
2524
immutable NullType end
2625
const NULL = NullType()
@@ -37,6 +36,7 @@ type ResultSet
3736
end
3837
==(a::ResultSet,b::ResultSet) = a.colnames == b.colnames && a.values == b.values
3938
include("show.jl")
39+
Base.convert(::Type{Matrix},a::ResultSet) = [a[i,j] for i=1:size(a,1), j=1:size(a,2)]
4040

4141
type SQLiteDB{T<:AbstractString}
4242
file::T

0 commit comments

Comments
 (0)