I've recently moved a project from PHP to Scala and have started working on adding database support. I'm using Slick 2.1 and am loving it so far. Everything works great, however I can't figure out how to return query results as a map (assuming this is even supported). I was previously using PHP's PDO, which returned an associative array.
Basically, instead of results being a Seq of whatever table class, I'd like to be able to retrieve them as such:
Seq(
Map("id" -> 1, "email" -> "myEmail1", "password" -> "myPassword1"),
Map("id" -> 2, "email" -> "myEmail2", "password" -> "myPassword1")
)
I could convert the case classes into a map, but it'd definitely be nice if I could avoid that extra step. I guess that also would't work for mapped queries. I'm pretty new to Scala and Slick, so hopefully I'm not missing something really obvious.
Thanks for the help!