Andrew Jeffery
decd03a5d7
Add values iterator
2022-04-08 18:18:47 +01:00
Andrew Jeffery
1ca49cfa9b
Add range to transactable and rename value to get
...
Also changes values to get_conflicts for more clarity on what it does
and opening up the name for iterating over values.
2022-04-08 18:18:22 +01:00
Andrew Jeffery
4406a5b208
Add range query
...
This is a way of efficiently getting just the keys and values in a
range.
2022-04-08 18:17:54 +01:00
Orion Henry
609234bb9d
Merge pull request #330 from jeffa5/experiment-graphemes
...
Remove grapheme splitting internally
2022-04-08 12:54:54 -04:00
Andrew Jeffery
94a122478d
Add object replacement character in text_at
2022-04-08 10:13:52 +01:00
Andrew Jeffery
1bbcd4c151
Test that we can insert long strings into text
2022-04-08 09:36:48 +01:00
Andrew Jeffery
80ce447d72
Add conversion from &String for Value and ScalarValue
2022-04-08 09:36:48 +01:00
Andrew Jeffery
e4e9e9a691
Add tests for inserting into text
...
This ensures that we can still insert entire graphemes (small strings)
and break them into chars automatically.
2022-04-08 09:36:47 +01:00
Andrew Jeffery
842797f3aa
Use Unicode Scalars instead of graphemes in text
2022-04-08 09:35:59 +01:00
Orion Henry
9ca4792424
fmt
2022-04-07 14:53:14 -04:00
Orion Henry
37d90c5b8e
optimize fork_at
2022-04-07 14:43:56 -04:00
Orion Henry
f5d858df82
Merge remote-tracking branch 'origin/experiment' into wasm_readme
2022-04-07 14:23:52 -04:00
Andrew Jeffery
06d2306d54
Add path_to_object
2022-04-07 15:04:00 +01:00
Andrew Jeffery
cc8134047a
Document parent_object
2022-04-07 14:52:25 +01:00
Andrew Jeffery
e9adc32486
Fixup OpIdSearch's key extraction
2022-04-07 14:51:31 +01:00
Andrew Jeffery
a88d49cf45
Fixup builds
2022-04-07 14:32:17 +01:00
Andrew Jeffery
ebb73738da
Remove B
2022-04-07 14:21:52 +01:00
Andrew Jeffery
bd2f252e0b
Try and fix parent object query
2022-04-07 14:21:17 +01:00
Andrew Jeffery
9e71736b88
Fixup after rebase
2022-04-07 14:21:16 +01:00
Andrew Jeffery
12a4987ce7
Use prop rather than exposing legacy::Key
2022-04-07 14:20:57 +01:00
Andrew Jeffery
aeadedd584
Add watch example
2022-04-07 14:20:57 +01:00
Andrew Jeffery
dcc6c68485
Add parent's id to the op tree
2022-04-07 14:20:56 +01:00
Orion Henry
9fe8447d21
loadDoc -> load() and forkAt()
2022-04-07 01:19:27 -04:00
Andrew Jeffery
53f6904ae5
Add to_owned method to get a static value
2022-04-04 21:13:09 +01:00
Orion Henry
83c08344e7
wip2
2022-04-04 12:37:57 -04:00
Andrew Jeffery
545807cf74
Have historic versions clone the value again
...
This is to currently avoid the issue with counters.
2022-04-04 13:06:36 +01:00
Andrew Jeffery
fa2971a29a
Have value be a reference for scalars
2022-04-04 12:47:08 +01:00
Andrew Jeffery
a2d4b2a778
Use ref on seek_op
2022-04-04 11:58:37 +01:00
Andrew Jeffery
48ce85dbfb
Add ref to treequery to allow borrowing ops
2022-04-04 11:55:22 +01:00
Andrew Jeffery
8f4562b2cb
Have apply_changes take an iterator
2022-04-01 23:02:56 +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
5cbc977076
More internal renames of del and inc
2022-04-01 13:36:27 +01:00
Andrew Jeffery
1a66dc7ab1
Use full names for delete and increment
2022-04-01 13:36:00 +01:00
Andrew Jeffery
0e457d5891
Remove const B: usize requirement everywhere
...
This doesn't need to be generic on everything, just defined once as a
const and referenced.
2022-03-31 13:53:26 +01:00
Andrew Jeffery
12f070ce45
Merge pull request #323 from jeffa5/experiment-update-tree
...
Change set to update to avoid cloning and make it more efficient
2022-03-31 07:05:37 -05:00
Andrew Jeffery
a69643c9cc
Change set to update to avoid cloning and make it more efficient
2022-03-31 12:04:42 +01:00
Orion Henry
ab580df947
Merge remote-tracking branch 'origin/experiment' into getnerate-patches
2022-03-30 13:04:51 -06:00
Orion Henry
2dcbfbf27d
clippy
2022-03-30 13:28:52 -04:00
Martin Kleppmann
ab4dc331ac
cargo fmt
2022-03-30 13:12:07 -04:00
Martin Kleppmann
a9eddd88cc
Bugfix: resurrection of deleted list elements
2022-03-30 13:12:07 -04:00
Martin Kleppmann
975338900c
Document another suspected bug
...
Testing this is harder because I need to construct a tree in which list
elements are split across multiple tree nodes, and the number of list
elements required to trigger this condition depends on the branching
factor of the tree, which I don't really want to hard-code into the
tests in case we change it...
2022-03-30 13:12:07 -04:00
Martin Kleppmann
361db06eb5
Delete unnecessary code
...
This check is not needed because the case `e == HEAD` can only happen if
`self.op` is a list insertion operation, and an insertion operation
always has empty `preds`, so it can never overwrite any existing list
element.
2022-03-30 13:12:07 -04:00
Martin Kleppmann
ba177c3d83
Fix broken handling of conflicts on list elements
2022-03-30 13:12:07 -04:00
Martin Kleppmann
fa0a8953dc
More tests and comments
2022-03-30 13:12:07 -04:00
Martin Kleppmann
cf508a94a9
Slight simplification
2022-03-30 13:12:07 -04:00
Martin Kleppmann
289dd95196
Fix index calculation for insertions at the head
2022-03-30 13:12:07 -04:00
Martin Kleppmann
c908979372
Fix search for the correct insertion position
2022-03-30 13:12:07 -04:00
Martin Kleppmann
7025bb6541
Tests and fixes for list patches
2022-03-30 13:12:07 -04:00
Martin Kleppmann
145969152a
Fix conversion of OpId to ExId when referring to root object
2022-03-30 13:12:07 -04:00
Martin Kleppmann
94ff10f690
Rename and reformat a bit
2022-03-30 13:12:07 -04:00