我有以下文件,作为API端点连接到我的数据库。如何正确地维护单个连接(或连接池)的服务器寿命?
(ns my-api.repository
(:require [clojure.java.jdbc :as sql]))
(defn some-query
(sql/with-connection (System/getenv "DATABASE_URL")
(sql/with-query-results results
;; You get the picture
)))