diff --git a/src/SQLite.jl b/src/SQLite.jl index 022df3d..445ccd3 100644 --- a/src/SQLite.jl +++ b/src/SQLite.jl @@ -372,6 +372,7 @@ juliatype(x::Integer) = x == SQLITE_INTEGER ? Int64 : x == SQLITE_FLOAT ? Float64 : x == SQLITE_TEXT ? String : + x == SQLITE_NULL ? Missing : Any # convert SQLite declared type into Julia equivalent, diff --git a/test/runtests.jl b/test/runtests.jl index 799adc4..05d9aed 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -104,7 +104,7 @@ end empty_tbl = DBInterface.execute(columntable, db, "SELECT * FROM Employee WHERE FirstName='Joanne'") all_tbl = DBInterface.execute(columntable, db, "SELECT * FROM Employee") @test propertynames(empty_tbl) == propertynames(all_tbl) - @test all(col -> eltype(empty_tbl[col]) >: eltype(all_tbl[col]), propertynames(all_tbl)) + @test all(col -> eltype(empty_tbl[col]) == Missing || eltype(empty_tbl[col]) >: eltype(all_tbl[col]), propertynames(all_tbl)) end DBInterface.execute(db, "create table temp as select * from album")