java.jdbc delta update examples

59 views
Skip to first unread message

Craig

unread,
Apr 8, 2013, 4:31:31 PM4/8/13
to clo...@googlegroups.com

I am looking for example(s) of using clojure java.jdbc to perform delta update eg SALARY = SALARY + 1000. Links appreciated. Thanks.

Sean Corfield

unread,
Apr 8, 2013, 5:49:49 PM4/8/13
to clo...@googlegroups.com
If you're using 0.3.0-alpha1, I think I'd recommend using native SQL
and the execute! function:

(j/execute! my-db "UPDATE employee SET SALARY = SALARY + 1000 WHERE
department = ?" [dept])

Sean

On Mon, Apr 8, 2013 at 1:31 PM, Craig <craig....@gmail.com> wrote:
>
> I am looking for example(s) of using clojure java.jdbc to perform delta
> update eg SALARY = SALARY + 1000. Links appreciated. Thanks.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)
Reply all
Reply to author
Forward
0 new messages