You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure rows are only valid while currently being iterated (#262)
Fixes#251 amongst other issues. This PR makes `SQLite.Row` explicitly
error when values are attempted to be accessed and it's not the
currently iterated row. It borrows the idea from the MySQL.jl package,
which as a similar "sync" of row numbers between the `Row` and `Query`
objects.
functiongetvalue(q::Query, col::Int, ::Type{T}) where {T}
61
+
@noinlinewrongrow(i) =throw(ArgumentError("row $i is no longer valid; sqlite query results are forward-only iterators where each row is only valid when iterated; re-execute the query, convert rows to NamedTuples, or stream the results to a sink to save results"))
62
+
63
+
functiongetvalue(q::Query, col::Int, rownumber::Int, ::Type{T}) where {T}
0 commit comments