diff --git a/src/clear/sql/insert_query.cr b/src/clear/sql/insert_query.cr index 3c75585a9..87d086b15 100644 --- a/src/clear/sql/insert_query.cr +++ b/src/clear/sql/insert_query.cr @@ -55,7 +55,7 @@ class Clear::SQL::InsertQuery loop do rs.each_column do |col| - h[col] = rs.read + h[col] = rs.read.as(Clear::SQL::Any) end yield(h) diff --git a/src/clear/sql/query/fetch.cr b/src/clear/sql/query/fetch.cr index ecd8cd239..3b4937d3e 100644 --- a/src/clear/sql/query/fetch.cr +++ b/src/clear/sql/query/fetch.cr @@ -5,7 +5,7 @@ module Clear::SQL::Query::Fetch loop do rs.each_column do |col| - h[col] = rs.read + h[col] = rs.read.as(Clear::SQL::Any) end yield(h) diff --git a/src/clear/sql/query/pluck.cr b/src/clear/sql/query/pluck.cr index a843286e0..cfc54ba84 100644 --- a/src/clear/sql/query/pluck.cr +++ b/src/clear/sql/query/pluck.cr @@ -32,7 +32,7 @@ module Clear::SQL::Query::Pluck o = [] of Clear::SQL::Any while rs.move_next - o << rs.read + o << rs.read.as(Clear::SQL::Any) end o ensure @@ -85,7 +85,7 @@ module Clear::SQL::Query::Pluck o = [] of Tuple({% for t in T %}Clear::SQL::Any,{% end %}) while rs.move_next - o << { {% for t in T %} rs.read, {% end %} } + o << { {% for t in T %} rs.read.as(Clear::SQL::Any), {% end %} } end o {% end %}