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

xSync should commit all xWrite things to the Indexed DB? #53

Closed
zzyhdu opened this issue Jun 8, 2022 · 2 comments
Closed

xSync should commit all xWrite things to the Indexed DB? #53

zzyhdu opened this issue Jun 8, 2022 · 2 comments

Comments

@zzyhdu
Copy link

zzyhdu commented Jun 8, 2022

async sync() {

I'm someone new with Sqlite. But what i'm think is: when sqlite call the xSync, we may need to flush all thing to the disk(Indexed DB).Like:

async sync() {
await #chain;
return this.#txComplete;
}

Correct me if i have something misunderstand.

@rhashimoto
Copy link
Owner

The IDBContext.sync() implementation waits for any pending request to complete and then returns a Promise that resolves when the current transaction is complete. I think that does exactly what you're saying. Can you provide an example sequence of events where this fails?

@rhashimoto rhashimoto added the clarification needed Further information is requested label Jun 10, 2022
@zzyhdu
Copy link
Author

zzyhdu commented Jun 16, 2022

Sorry about the long time reply. Just back from hospital. Rerun the code, it went well. I will close the issue. Sorry again~ aha

@zzyhdu zzyhdu closed this as completed Jun 16, 2022
@rhashimoto rhashimoto removed the clarification needed Further information is requested label Jun 16, 2022
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

No branches or pull requests

2 participants