Alex Good
9332ed4ad9
wip
2022-03-20 14:48:30 +00:00
Andrew Jeffery
a4e8d20266
Optimise getting number of ops when applying tx or changes
2022-03-11 12:25:34 +00:00
Andrew Jeffery
ac18f7116f
And fixup IntoIterator
2022-03-11 12:25:18 +00:00
Andrew Jeffery
67251f4d53
Have splice take IntoIterator
2022-03-11 12:24:02 +00:00
Andrew Jeffery
2e49561ab2
Make splice take iterator instead of vec
2022-03-11 12:13:11 +00:00
Andrew Jeffery
488df55385
Remove change field on Op as unused
...
This field was never read from.
2022-03-11 11:40:42 +00:00
Andrew Jeffery
a2cb15e936
Remove obj from the op as it can be gotten from the optree
...
This makes the Op struct smaller, helping memory usage and cache
coherence.
2022-03-11 11:40:28 +00:00
Orion Henry
ee116bb5d7
object_type returns an option
2022-03-09 19:42:58 -05:00
Orion Henry
c51073c150
add paths/materialize to api
2022-03-09 17:53:30 -05:00
Andrew Jeffery
d00cee1637
Misc API updates
...
- Commit now returns just a single hash rather than a vec. Since the
change we create from committing has all of the heads as deps there
can only be one hash/head after committing.
- Apply changes now takes a Vec rather than a slice. This avoids having
to clone them inside.
- transact_with now passes the result of the closure to the commit
options function
- Remove patch struct
- Change receive_sync_message to return a () instead of the
`Option<Patch>`
- Change `Transaction*` structs to just `*` and use the transaction
module
- Make CommitOptions fields public
2022-03-09 12:33:20 +00:00
Andrew Jeffery
a9737a6815
Fix del missing key in map
2022-03-09 10:31:25 +00:00
Andrew Jeffery
a4432bdc3d
Nothing really Into's ObjType so just take it directly
2022-03-04 13:03:19 +00:00
Andrew Jeffery
b6c9d90d84
Rename value to object in insert_object
2022-03-04 09:51:17 +00:00
Andrew Jeffery
338dc1bece
Change splice to accept scalars only
2022-03-04 09:51:16 +00:00
Andrew Jeffery
79d493ddd2
Rename make to set_object
2022-03-04 09:50:48 +00:00
Andrew Jeffery
e42adaf84b
Fixup automerge tests
2022-03-04 09:47:37 +00:00
Andrew Jeffery
9406bf09ea
Fix some tests
2022-03-03 22:53:55 +00:00
Andrew Jeffery
1a6abddb50
Example of make in the API
2022-03-03 22:53:21 +00:00
Andrew Jeffery
affb85b0b4
Add make to transaction API
2022-03-03 22:51:51 +00:00
Andrew Jeffery
c0070e081d
Reorder generics
2022-03-03 18:21:58 +00:00
Andrew Jeffery
9ae988e754
Use as_ref instead of borrow
2022-03-03 14:37:24 +00:00
Andrew Jeffery
682b8007b9
Borrow exid to avoid &ROOT everywhere
2022-03-03 09:05:08 +00:00
Andrew Jeffery
f6f6b5181d
Fix rolling back of transaction infecting document
2022-03-02 18:08:00 +00:00
Andrew Jeffery
dfd3d27d44
Don't clone value in splice
2022-03-02 14:25:02 +00:00
Andrew Jeffery
f8af94b317
Move B to internal Keys
2022-02-25 17:31:48 +00:00
Andrew Jeffery
f51e44c211
Update keys iterator to iterate at the tree level
...
No more big vec allocation now!
2022-02-25 17:31:33 +00:00
Andrew Jeffery
a726cf33c7
Add keys struct for iteration
...
This at least helps to not convert all of the keys to their strings
automatically but still allocates a vec.
2022-02-25 17:31:14 +00:00
Andrew Jeffery
8d24c9e4c3
Fix rollback of transaction using index into the tree
2022-02-21 14:00:41 +00:00
Andrew Jeffery
4a6b91adb2
Add test for broken rollback
2022-02-21 13:30:23 +00:00
Andrew Jeffery
6b4393c0b3
Rename transaction module
2022-02-21 11:40:49 +00:00
Andrew Jeffery
cbd3406f8d
Document commit_with and CommitOptions
2022-02-21 10:47:23 +00:00
Andrew Jeffery
66f8c73dba
Document drop on transaction
2022-02-21 10:36:42 +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
ea826b70f4
Move TransactionInner and add get methods to Transaction
2022-02-16 14:15:36 +00:00