Commit graph

791 commits

Author SHA1 Message Date
Andrew Jeffery
9ae988e754 Use as_ref instead of borrow 2022-03-03 14:37:24 +00:00
Andrew Jeffery
51f1c05545 Add mutation of old object 2022-03-03 10:36:10 +00:00
Andrew Jeffery
b323f988f9 Add test for overwriting a map and getting value from old one 2022-03-03 10:28:40 +00:00
Andrew Jeffery
682b8007b9 Borrow exid to avoid &ROOT everywhere 2022-03-03 09:05:08 +00:00
Orion Henry
0f71b48857
Merge pull request #282 from automerge/move_wasm_to_feature
move wasm to feature flag
2022-03-02 14:07:34 -05:00
Orion Henry
0141bcdc8f import cli 2022-03-02 14:05:10 -05:00
Andrew Jeffery
0b9d14edc4
Merge pull request #285 from jeffa5/experiment-rollback-transaction
Fix rolling back a transaction with a new actor
2022-03-02 18:15:00 +00:00
Andrew Jeffery
f6f6b5181d Fix rolling back of transaction infecting document 2022-03-02 18:08:00 +00:00
Andrew Jeffery
712697cff0 Add test for rolling back a transaction 2022-03-02 18:03:11 +00:00
Orion Henry
8f11825003
Merge pull request #284 from jeffa5/experiment-actors
Always have an actor on the document
2022-03-02 12:32:57 -05:00
Andrew Jeffery
8f2877a67c Fix wasm 2022-03-02 17:24:15 +00:00
Andrew Jeffery
06241336fe Add with_actor for functional style 2022-03-02 17:22:26 +00:00
Andrew Jeffery
52eb193950 Add custom actor enum to avoid caching an unused one 2022-03-02 17:20:44 +00:00
Andrew Jeffery
30e0748c15 Remove new_with_actor_id on documents 2022-03-02 17:02:26 +00:00
Andrew Jeffery
8eea9d7c0b Always have an actor 2022-03-02 16:59:45 +00:00
Orion Henry
2747d5bf2b move wasm to feature flag 2022-03-02 11:05:48 -05:00
Andrew Jeffery
93e0156c87
Merge pull request #281 from jeffa5/experiment-save-opt
Optimise saving documents
2022-03-02 14:57:09 +00:00
Andrew Jeffery
dfd3d27d44 Don't clone value in splice 2022-03-02 14:25:02 +00:00
Andrew Jeffery
d2e33867f6 Update style 2022-03-02 10:51:09 +00:00
Andrew Jeffery
57cf8200ac Remove unnecessary to_vec 2022-03-02 10:47:55 +00:00
Andrew Jeffery
7a930db44d Don't decode changes for save 2022-03-02 10:45:25 +00:00
Andrew Jeffery
cffadafbd0 Stop collecting to vecs in save 2022-03-02 10:27:29 +00:00
Orion Henry
96488a2774
Merge pull request #278 from jeffa5/iterable-query
Make keys and keys_at iterators
2022-03-01 22:13:33 -05:00
Andrew Jeffery
dfb21ea8d6
Add quickstart example using new transaction (#273)
* Add quickstart example

Also change ordering of transact_with arguments.
This makes it more natural read: transact_with these commit options,
doing this.
2022-02-28 11:49:36 +00:00
Andrew Jeffery
d80a9c6746 Rename IterKeys and IterKeysAt 2022-02-25 17:31:50 +00:00
Andrew Jeffery
f8af94b317 Move B to internal Keys 2022-02-25 17:31:48 +00:00
Andrew Jeffery
6f2536c232 Make keysat double ended 2022-02-25 17:31:34 +00:00
Andrew Jeffery
4ff456cdcc Update keys to use map 2022-02-25 17:31:34 +00:00
Andrew Jeffery
989310866f Add DoubleEndedIterator for Keys 2022-02-25 17:31:34 +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
7439593caf Document keys functions 2022-02-25 17:30:34 +00:00
Orion Henry
337fabe5a9
Merge pull request #271 from jeffa5/experiment-txn
Transaction API
2022-02-24 18:07:05 -05:00
Orion Henry
06302e4a17 make() defaults to text 2022-02-24 00:22:56 -05:00
Orion Henry
2fc0705907 change MAP,LIST,TEXT to be {},[],'' - allow recursion 2022-02-23 19:43:13 -05:00
Orion Henry
b96aa168b4 choking on bad value function 2022-02-22 12:10:11 -05: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
355cbdd251 Rename try_start_transaction to ensure_transaction_open 2022-02-21 10:49:58 +00:00
Andrew Jeffery
3493dbd74a Rename autotxn to autocommit 2022-02-21 10:49:14 +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
f8c9343a45 Add get_heads to transaction 2022-02-19 18:57:32 +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
62c71845cd Add some basic docs for Automerge mutations 2022-02-16 15:12:51 +00:00
Andrew Jeffery
e970854042 Fix benchmark ids 2022-02-16 14:56:17 +00:00
Andrew Jeffery
2f49a82eea Have generate_sync_message not take mut self 2022-02-16 14:20:49 +00:00
Andrew Jeffery
ea826b70f4 Move TransactionInner and add get methods to Transaction 2022-02-16 14:15:36 +00:00