Skip to content

Commit fdfe013

Browse files
committed
Update docstring
1 parent 2c6bbac commit fdfe013

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/xitdb/db.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@
8585
"Performs the 'swap!' operation while locking `db.lock`.
8686
Returns the new value of the database.
8787
If the binding `*return-history?*` is true, returns
88-
`[current-history-index db-before db-after]`."
88+
`[current-history-index db-before db-after]`.
89+
If `keypath` is not empty, the result of `f` will be written to the db at `keypath` rather
90+
than db root.
91+
Similarly, if `keypath` is not empty, the returned value will be the value at `keypath`."
8992
[xitdb base-keypath f & args]
9093
(let [^ReentrantLock lock (.-lock xitdb)]
9194
(when (.isHeldByCurrentThread lock)

0 commit comments

Comments
 (0)