Skip to content

Commit

Permalink
Downcase type values loaded from extension.
Browse files Browse the repository at this point in the history
Reverted downcase in spec, and updated another spec to use a lower cased type ('BLOB' => 'blob').  Updated ordering of arguments in the latter spec.
  • Loading branch information
petergoldstein committed May 16, 2022
1 parent e480508 commit 07c0950
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/sqlite3/statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def get_metadata
column_name column
end
@types = Array.new(column_count) do |column|
column_decltype column
val = column_decltype(column)
val.nil? ? nil : val.downcase
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_integration_resultset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_enumerable
end

def test_types
assert_equal [ "integer", "text" ], @result.types.map { |t| t.downcase }
assert_equal [ "integer", "text" ], @result.types
end

def test_columns
Expand Down
2 changes: 1 addition & 1 deletion test/test_statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_bind_blob
row = @db.execute('select * from foo')

assert_equal ['hello'], row.first
assert_equal row.first.types, ['BLOB']
assert_equal ['blob'], row.first.types
end

def test_bind_64
Expand Down

0 comments on commit 07c0950

Please sign in to comment.