Skip to content

Commit

Permalink
assoc-in should update nested value (#124)
Browse files Browse the repository at this point in the history
* Fix #120.

* Bump version, update README.

* Don't use prefix.

* Fix internal -assoc-in to overwrite only on assoc.

* Add assoc-in test.

* Fix test.

* Improve test.

* Update badge.
  • Loading branch information
whilo authored Dec 30, 2024
1 parent a19c00e commit 4c251c9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
20 changes: 19 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ that it does not get lost.
:CUSTOM_ID: h:07b8872b-1b84-412b-8133-4dbb9d2a7430
:END:

Add to your dependencies: [[http://clojars.org/io.replikativ/konserve][http://clojars.org/io.replikativ/konserve/latest-version.svg]]
Add to your dependencies: [![Clojars Project](https://img.shields.io/clojars/v/io.replikativ/konserve.svg)](https://clojars.org/io.replikativ/konserve)

*** Synchronous Execution
:PROPERTIES:
Expand Down Expand Up @@ -234,19 +234,30 @@ the implementation of external backends. Unfortunately most of the external back
are deprecated now because of this.

**** Supported backends
:PROPERTIES:
:CUSTOM_ID: h:0100b431-cbaa-4aec-8750-9c02bc0965ba
:END:

- [[https://github.com/replikativ/konserve-jdbc][konserve-jdbc]]
- [[https://github.com/replikativ/konserve-s3][konserve-s3]]
- [[https://github.com/replikativ/konserve-redis][konserve-redis]]
- [[https://github.com/replikativ/konserve-dynamodb][konserve-dynamodb]]

Please let us know if you are interested in other backends or if you need help
with implementing one.

**** Unofficial backends
:PROPERTIES:
:CUSTOM_ID: h:333570e0-e842-4eca-aef3-9a61fdb67499
:END:

- [[https://github.com/replikativ/konserve-rocksdb][konserve-rocksdb]]
- [[https://github.com/The-Literal-Company/konserve-gcs][konserve-gcs]]

**** Outdated backends
:PROPERTIES:
:CUSTOM_ID: h:2ff08b83-d842-4cdc-a5e4-1d3144e7993a
:END:

The following projects are incompatible with the latest konserve release, but
describe the usage of the underlying store API and could still be helpful to
Expand Down Expand Up @@ -336,6 +347,13 @@ like CouchDB, Redis and Riak.
:CUSTOM_ID: h:db9710e5-93b2-45db-ab9c-38e2d7ef6765
:END:

*** 0.8
:PROPERTIES:
:CUSTOM_ID: h:70f33c7f-ddf1-474f-b305-db802fe64116
:END:
- fix nested assoc-in bug #120 (breaking)


*** 0.7.274
:PROPERTIES:
:CUSTOM_ID: h:433a14fe-229b-4944-8beb-fd268917705c
Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(def org "replikativ")
(def lib 'io.replikativ/konserve)
(def current-commit (b/git-process {:git-args "rev-parse HEAD"}))
(def version (format "0.7.%s" (b/git-count-revs nil)))
(def version (format "0.8.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
Expand Down
1 change: 1 addition & 0 deletions src/konserve/compliance_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
(<!! (k/update-in store [:foo] name opts))
(is (= "bar2" (<!! (k/get store :foo nil opts))))
(<!! (k/assoc-in store [:baz] {:bar 42} opts))
(<!! (k/assoc-in store [:baz :barf] 43 opts))
(is (= 42 (<!! (k/get-in store [:baz :bar] nil opts))))
(<!! (k/update-in store [:baz :bar] inc opts))
(is (= 43 (<!! (k/get-in store [:baz :bar] nil opts))))
Expand Down
2 changes: 1 addition & 1 deletion src/konserve/impl/defaults.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@
:config config
:sync? sync?
:buffer-size buffer-size
:overwrite? true
:overwrite? (empty? (rest key-vec))
:msg {:type :write-edn-error
:key (first key-vec)}})))

Expand Down

0 comments on commit 4c251c9

Please sign in to comment.