Use a database with Clojure

后端 未结 12 1563
青春惊慌失措
青春惊慌失措 2021-01-31 08:22

What methods to use a database from Clojure are there?

I know from Clojure you can do anything you can with Java, but that means that I may end up using something overly

12条回答
  •  余生分开走
    2021-01-31 08:58

    I would now (as of late 2011) recommend Korma - "Tasty SQL for Clojure"

    It's a beautiful little SQL DSL, here's an example from the website:

    (select users
      (aggregate (count :*) :cnt)
      (where (or (> :visits 20)
                 (< :last_login a-year-ago))))
    

提交回复
热议问题