29 Nov 2009, 10:34
Generic-user-small

Del Ben Oscar (9 posts)

Hi, I’m using contrib.sql like in the examples in the book, except I’m interfacing with mysql. Here’s my code:


(defn do-query
  [query]
  (with-connection
    db
    (with-query-results
      res
      [query]
      (into [] res))))

The problem with this is that the result set is always the same. If I change a value in the database, the result set does not change. I really have no idea why this happens.

29 Nov 2009, 13:11
Generic-user-small

Del Ben Oscar (9 posts)

It looks like if I do any other operation in the db then it reloads the results. I guess they are cached until needed.

  You must be logged in to comment