Seems like something generic enough to move into jdbc.clj?