Skip to content

How to identify changes / changed nodes? #376

Closed
@michaelrampl

Description

@michaelrampl

Assuming that I want to update another data structure with changes from yrs transactions, how do I approach that?

My idea was to use some identifiers that are the same in both data structures and update or insert after every y-crdt commit.

I thought about using the changed_parent_types for that, e.g.

for branch_ptr in remote_txn.changed_parent_types()
        println!("* {:?}", branch_ptr);
}

Output

* YText(start: (<4005326611#2>))
* YArray(start: (<4005326611#0>))

Even though this gives me some start position, which looks like a crdt id, I can't access these variables directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions