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

Support for writting into file with nodefs #4

Open
lygstate opened this issue Jan 3, 2019 · 2 comments
Open

Support for writting into file with nodefs #4

lygstate opened this issue Jan 3, 2019 · 2 comments

Comments

@lygstate
Copy link

lygstate commented Jan 3, 2019

No description provided.

@mandel59
Copy link
Owner

mandel59 commented Jan 7, 2019

The Node.js File System API doesn't meet the SQLite "VFS" API because Node.js provides asynchronous functions but SQLite requires synchronous functions. (Node.js also provides synchronous version of these functions, but they block all other async tasks running in the same thread.)

Although I haven't tried it yet, Asyncify should be helpful to solve that problem: it converts some synchronous function calls (and currently all function pointer calls) into asynchronous ones.

@mandel59
Copy link
Owner

mandel59 commented Jan 7, 2019

Oh, I haven't cared the fact that the SQLite API would be async too if Asyncify is enabled, and it is not so obvious that JavaScript code is able to call async functions in C. The way to do so is not well documented.

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