File tree Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Original file line number Diff line number Diff line change 350350 t (t/sql-timestamp t)]
351351 (.setTimestamp ps i t cal)))
352352
353- (defmethod sql-jdbc.execute /do-with-connection-with-options :teradata
354- [driver database _options f]
355- (let [conn (.getConnection (sql-jdbc.execute/datasource database))]
356- (try
357- (sql-jdbc.execute/set-best-transaction-level! driver conn)
358- (try
359- (.setReadOnly conn true )
360- (catch Throwable e
361- (log/debug e (trs " Error setting connection to read-only" ))))
362- (try
363- (.setHoldability conn ResultSet/CLOSE_CURSORS_AT_COMMIT)
364- (catch Throwable e
365- (log/debug e (trs " Error setting default holdability for connection" ))))
366- (f conn) ; ; Pass the connection to the provided function
367- (catch Throwable e
368- (.close conn)
369- (throw e)))))
353+ (defmethod sql-jdbc.execute /do-with-connection-with-options :redshift
354+ [driver db-or-id-or-spec options f]
355+ (sql-jdbc.execute/do-with-resolved-connection
356+ driver
357+ db-or-id-or-spec
358+ options
359+ (fn [^Connection conn]
360+ (when-not (sql-jdbc.execute/recursive-connection? )
361+ (sql-jdbc.execute/set-best-transaction-level! driver conn)
362+ (try
363+ (.setReadOnly conn true )
364+ (catch Throwable e
365+ (log/debug e (trs " Error setting connection to read-only" ))))
366+ (try
367+ (.setHoldability conn ResultSet/CLOSE_CURSORS_AT_COMMIT)
368+ (catch Throwable e
369+ (log/debug e (trs " Error setting default holdability for connection" )))))
370+ (f conn))))
370371
371372(defn- cleanup-query
372373 " Remove the OFFSET keyword."
You can’t perform that action at this time.
0 commit comments