jkk/honeysql — pull request #9 by doffltmiw (2013-09-06 14:30:07+00:00)
Title: add support for insert, update and delete queries

Hi,

I've added basic support for insert, update and delete queries.
Here are some examples:

(format {:insert-into :foo
:values {:id 1 :name "bob"}})
;= ["INSERT INTO foo (name, id) VALUES (?, 1)" "bob"]

(format {:insert-into :foo
:values [1 "bob"]})
;= ["INSERT INTO foo VALUES (1, ?)" "bob"]

(format {:update :foo
:set {:name "bob" :description "hi"}
:where [:= :id 123]})
;= ["UPDATE foo SET name = ?, description = ? WHERE id = 123" "bob" "hi"]

(format {:delete-from :foo
:where [:= :id 123]})
;= ["DELETE FROM foo WHERE id = 123"]

I haven't updated README.md. I couldn't decide where is the appropriate location to put it.