Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
(def db-one {:classname "org.postgresql.Driver" :subprotocol "postgresql" :subname (str "//" (database :host) ":5432/" (database :db)) :user (database :user) :password (database :pass) }) (def db-two {:classname "org.postgresql.Driver" :subprotocol "postgresql" :subname (str "//" (database :host) ":5432/" (database :db)) :user (database :user) :password (database :pass) }) (sql/with-connection db-one (sql/transaction (create-todo (user-id (params :for)) (params :title) (params :body) (params :created_on) (user-id (params :created_by)) (params :finish_on)))) (sql/with-connection db-two (sql/transaction (create-todo (user-id (params :for)) (params :title) (params :body) (params :created_on) (user-id (params :created_by)) (params :finish_on)))) (defn create-todo [user_id title body created_on created_by finish_on] (sql/insert-values :todos [:user_id :title :body :created_on :created_by :finish_on] [user_id title body (timestamp created_on) created_by (timestamp finish_on)]))
This paste will be private.
From the Design Piracy series on my blog: