Skip to content

Commit 07c0950

Browse files
Downcase type values loaded from extension.
Reverted downcase in spec, and updated another spec to use a lower cased type ('BLOB' => 'blob'). Updated ordering of arguments in the latter spec.
1 parent e480508 commit 07c0950

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/sqlite3/statement.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ def get_metadata
137137
column_name column
138138
end
139139
@types = Array.new(column_count) do |column|
140-
column_decltype column
140+
val = column_decltype(column)
141+
val.nil? ? nil : val.downcase
141142
end
142143
end
143144
end

test/test_integration_resultset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def test_enumerable
118118
end
119119

120120
def test_types
121-
assert_equal [ "integer", "text" ], @result.types.map { |t| t.downcase }
121+
assert_equal [ "integer", "text" ], @result.types
122122
end
123123

124124
def test_columns

test/test_statement.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_bind_blob
127127
row = @db.execute('select * from foo')
128128

129129
assert_equal ['hello'], row.first
130-
assert_equal row.first.types, ['BLOB']
130+
assert_equal ['blob'], row.first.types
131131
end
132132

133133
def test_bind_64

0 commit comments

Comments
 (0)