Update README.md

This commit is contained in:
Howard M. Lewis Ship 2014-10-07 15:08:57 -07:00
parent f9ec9001e0
commit 0aeb9990da

View file

@ -123,7 +123,7 @@ The column values do not have to be literals, they can be nested queries:
:role_id (-> (select :id)
(from :role)
(where [:in :name role-names]))}])
(sql/format)))
sql/format))
=> ["INSERT INTO user_profile_to_role (user_profile_id, role_id)
VALUES (12345, (SELECT id FROM role WHERE (name in (?, ?))))"
"user" "editor"]