SQL Korma "count not supported on this type" error message

56 Views Asked by At

Doing a very simple request rows from 1 table i.e. select * from users. I am trying to pass the response to a selmer template to iterate over but i get the error message above and indeed i cant do the following

(count get-users)

so it looks like the response is not a Seq

so how do i convert the output of the below to a seq

(defn get-users []
  (select users ))

and so use in the below selmer call

(defn home-page []  
   (layout/render
    "users.html" {:users gw/get-users} ))

I am using 0.4.0 of korma

thanks

1

There are 1 best solutions below

0
AdiFatLady On

Im an idiot. Should be

{:users (gw/get-users)}

What a newb