Skip to content

Commit

Permalink
rs.read.as(Clear::SQL::Any)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamantoha committed Aug 24, 2024
1 parent 8be17f0 commit 2f702b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/clear/sql/insert_query.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/clear/sql/query/fetch.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/clear/sql/query/pluck.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 %}
Expand Down

0 comments on commit 2f702b8

Please sign in to comment.