-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from siyopao/patch-1
Add a test (hence example) for updating the set type
- Loading branch information
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -608,6 +608,12 @@ | |
"INSERT INTO test (v1, c, k) VALUES (null, 1, 0);" | ||
(insert :test (values [[:v1 nil] [:c 1] [:k 0]])) | ||
|
||
"UPDATE users SET emails = emails + {'[email protected]'} WHERE id = 73;" | ||
(update :users | ||
(set-columns {:emails | ||
[+ #{"[email protected]"}]}) | ||
(where [[= :id 73]])) | ||
|
||
"UPDATE user_profiles SET addresses = addresses + {'work' : {city : 'Santa Clara', street : '3975 Freedom Circle Blvd', zip : 95050}} WHERE login = 'tsmith';" | ||
(update :user_profiles | ||
(set-columns {:addresses | ||
|