From a5fc4d4cb9d3327b2f9bd2977853ec150484086d Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sat, 26 Jan 2008 17:43:45 +0000 Subject: check for TEXT columns before NULL, on the assumption that TEXT will be more common than NULL (thanks Erik Veenstra) --- lib/sqlite3/resultset.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sqlite3/resultset.rb b/lib/sqlite3/resultset.rb index 0b496b6..db0f262 100644 --- a/lib/sqlite3/resultset.rb +++ b/lib/sqlite3/resultset.rb @@ -123,7 +123,9 @@ module SQLite3 @driver.data_count( @stmt.handle ).times do |column| type = @driver.column_type( @stmt.handle, column ) - if type == Constants::ColumnType::NULL + if type == Constants::ColumnType::TEXT + row << @driver.column_text( @stmt.handle, column ) + elsif type == Constants::ColumnType::NULL row << nil elsif type == Constants::ColumnType::BLOB row << @driver.column_blob( @stmt.handle, column ) -- cgit