Skip to content

Commit cc88dbd

Browse files
committed
More Project DECOUPLE updates
1 parent d47af49 commit cc88dbd

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ DataStreams
55
DataFrames
66
NullableArrays
77
WeakRefStrings
8+
LegacyStrings
89
@osx Homebrew
910
@windows WinRPM

src/SQLite.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION >= v"0.4.0-dev+6521" && __precompile__(true)
22
module SQLite
33

4-
using DataStreams, DataFrames, WeakRefStrings
4+
using DataStreams, DataFrames, WeakRefStrings, LegacyStrings
55

66
export Data, DataFrame
77

src/Sink.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,19 @@ end
6161
# stream the data in `dt` into the SQLite table represented by `sink`
6262
function Data.stream!(source, ::Type{Data.Field}, sink::SQLite.Sink)
6363
rows, cols = size(source)
64+
Data.isdone(source, 1, 1) && return sink
6465
types = Data.types(source)
6566
handle = sink.stmt.handle
6667
transaction(sink.db) do
67-
row = 0
68-
while !Data.isdone(source, row, cols)
69-
row += 1
68+
row = 1
69+
while !Data.isdone(source, row, cols+1)
7070
for col = 1:cols
7171
@inbounds T = types[col]
7272
@inbounds getfield!(source, T, sink.stmt, row, col)
7373
end
7474
SQLite.sqlite3_step(handle)
7575
SQLite.sqlite3_reset(handle)
76+
row += 1
7677
end
7778
Data.setrows!(source, rows)
7879
end

0 commit comments

Comments
 (0)