Adding update! function #89

Merged
merged 3 commits into from Apr 6, 2011

Conversation

Projects
None yet
2 participants
@paraseba
Contributor

paraseba commented Mar 30, 2011

I added a function to update records without inserting if the records can't be found

I also removed multiple arguments from update-in! as discussed in #clojureql with you

tests added and passing

I'm not sure update! is a good name, LauJensen suggeste set!, but that's a special form in clojure

paraseba added some commits Mar 30, 2011

update-in! accepts only one record
It was accepting multiple maps, but the implementation was broken.
It doesn't seem to have much sense to pass multiple maps to update.
Added update! function
(update! [this pred record])

Updates a record where pred is true. Record
is a map from strings or keywords (identifying columns)
to updated values.

Ex. (update! (table :one) (where (= :id 5)) {:age 22})
@paraseba

This comment has been minimized.

Show comment Hide comment
@paraseba

paraseba Mar 30, 2011

Contributor

I added an explanation on how to run integration tests

Contributor

paraseba commented Mar 30, 2011

I added an explanation on how to run integration tests

Added documentation for integration tests
Explain how integration tests are run

@LauJensen LauJensen merged commit e94aa90 into LauJensen:master Apr 6, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment