Skip to content

Commit a5fc4d4

Browse files
committed
check for TEXT columns before NULL, on the assumption that TEXT will be more common than NULL (thanks Erik Veenstra)
1 parent ff8eb33 commit a5fc4d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/sqlite3/resultset.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ def next
123123
@driver.data_count( @stmt.handle ).times do |column|
124124
type = @driver.column_type( @stmt.handle, column )
125125

126-
if type == Constants::ColumnType::NULL
126+
if type == Constants::ColumnType::TEXT
127+
row << @driver.column_text( @stmt.handle, column )
128+
elsif type == Constants::ColumnType::NULL
127129
row << nil
128130
elsif type == Constants::ColumnType::BLOB
129131
row << @driver.column_blob( @stmt.handle, column )

0 commit comments

Comments
 (0)