Skip to content

Commit

Permalink
Merge pull request #45 from KuceraMartin/correct-casting-2
Browse files Browse the repository at this point in the history
Fix result casting
  • Loading branch information
KuceraMartin authored Aug 27, 2023
2 parents c1747ed + dea31cb commit dc93a30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/execution/QueryExecutor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class QueryExecutor(connection: Connection, translator: Translator):
case s: MultiScope =>
def conversion(rs: ResultSet) =
val m = s.toList.map{ e =>
(e.alias.toString -> rs.getString(e.alias))
(e.alias.toString -> rs.getObject(e.alias))
}
.toMap
Result(m).asInstanceOf[ref.Refined]
ResultIterator(rs, conversion)
case e: Expression[?, ?] =>
ResultIterator(rs, _.getString(1).asInstanceOf[ref.Refined])
ResultIterator(rs, _.getObject(1).asInstanceOf[ref.Refined])

end QueryExecutor

Expand Down

0 comments on commit dc93a30

Please sign in to comment.