Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement document change tracking #521

Closed
wants to merge 9 commits into from

Conversation

hyzx86
Copy link
Contributor

@hyzx86 hyzx86 commented Dec 25, 2023

Add a series of hooks to the session to monitor the update of the document object and implement actions after the document changes.

Such as implementing dynamic indexing, which seems to be difficult with the current design of Yessql.

In OC, neither ContentHandler nor a fake IndexProvider can determine whether an object needs to be saved to the database immediately. So the custom dynamic indexing functionality can only be written to the database immediately each time

            context.For<EocContentItemMapIndex>().When(contentItem =>
            {
                _serviceProvider = ShellScope.Services;
                UpdateIndex(contentItem).GetAwaiter().GetResult();
                return false;
            });

Through these hooks, we can insert custom code into the _commands list of the Session to achieve free insertion when the document is updated

relate:
#505

@hyzx86
Copy link
Contributor Author

hyzx86 commented Dec 25, 2023

@sebastienros Could you please help me to review this PR? thanks.

@hyzx86
Copy link
Contributor Author

hyzx86 commented Dec 28, 2023

Use another PR #525

@hyzx86 hyzx86 closed this Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant