Commit graph

20 commits

Author SHA1 Message Date
Orion Henry
0c9e77b644 added a test to ensure we dont break counter serialization 2022-06-09 12:45:20 +02:00
Orion Henry
d6bce697a5 normalize edit trace 2022-06-09 12:42:43 +02:00
Andrew Jeffery
0f2bd3fb27 Make edit-trace vals be a string and use splice_text 2022-04-07 12:22:28 +01:00
Andrew Jeffery
d331ceb6d4 Rename set to put and set_object to put_object 2022-04-01 13:40:58 +01:00
Andrew Jeffery
0fca6a48ee Add loading to edit-trace rust benchmark 2022-03-09 18:12:05 +00:00
Andrew Jeffery
f8cffa3deb Fix edit trace 2022-03-04 09:51:49 +00:00
Andrew Jeffery
682b8007b9 Borrow exid to avoid &ROOT everywhere 2022-03-03 09:05:08 +00:00
Andrew Jeffery
50a1b4f99c Add transactable trait 2022-02-21 10:32:57 +00:00
Andrew Jeffery
59e36cebe4 Improve transactions with drop, transact and better commit
Also remove modification operations directly on Automerge and switch
tests to using AutoTxn.
2022-02-17 11:29:36 +00:00
Andrew Jeffery
735a4ab84c Add explicit transaction API
This removes the requirement for `&mut self`s on some of the immutable
methods on `Automerge` which can be quite inconvenient.

I've reimplemented the main functions on `Automerge` that manipulate
state to create a transaction for their op for ease of use but not
performance. I've updated the edit trace to run in a single
transaction, like on a page load.

Wasm API still needs working on at the moment to expose this properly.
2022-02-16 11:38:43 +00:00
Alex Good
dc8140cb0b fmt 🙄 2022-01-01 20:17:38 +00:00
Orion Henry
3046cbab35
Replace the OpID API with an object ID
Rather than returning an OpID for every mutation, we now return an
`Option<ObjId>`. This is `Some` only when a `make*` operation was
applied. This `ObjID` is an opaque type which can be used with any
document.
2022-01-01 20:15:02 +00:00
Alex Good
962340805c
automerge::set - don't generate ops for noops
Repeatedly setting the same value for a particular (obj, key)
combination now no longer generates an operation. To allow this we
modify the return value of `automerge::set` so that it may return an
`Option<OpId>` instead of an `OpId`.

Signed-off-by: Alex Good <alex@memoryandthought.me>
2021-12-18 15:57:03 +00:00
Andrew Jeffery
0c417f02b2 Improve ergonomics of the main API 2021-12-16 05:46:01 -08:00
Orion Henry
0f9115c54f cleaned up edit trace, added docs 2021-12-13 09:20:49 -05:00
Orion Henry
a1a7e42dfa remove begin - make tx implicit 2021-12-12 12:51:27 -08:00
Orion Henry
e2b63ca102 adding text() and splice_text() 2021-12-10 15:20:19 -08:00
Orion Henry
0cc815ef74 move query logic into trait, format 2021-12-06 11:09:08 -05:00
Orion Henry
70b482b827 go faster 2021-12-03 21:56:59 -08:00
Orion Henry
a87fc3c1d3 profiling and seq_tree 2021-11-29 17:27:47 -07:00