Skip to content

Instantly share code, notes, and snippets.

@mefesto
mefesto / gist:990219
Created May 25, 2011 02:38 — forked from swannodette/gist:990176
bug.clj
(deftype Foo []
Object
(equals [this x]
(.. this getClass (isInstance x))))
(let [f (Foo.)]
(.equals f f)) ; false, creates problems when looking up items in map
(ns second-post.postgres
(:use aleph)
(:require [clojure.contrib.sql :as sql])
(:import [org.apache.commons.dbcp BasicDataSource]))
(def pool-size 10) ; or match expected number of threads
(def ds
(doto (BasicDataSource.)
(.setDriverClassName "org.postgresql.Driver")
(ns second-post.mysql
(:use aleph)
(:require [clojure.contrib.sql :as sql])
(:import [org.apache.commons.dbcp BasicDataSource]))
(def pool-size 10) ; or match expected number of threads
(def ds
(doto (BasicDataSource.)
(.setDriverClassName "com.mysql.jdbc.Driver")