-
Notifications
You must be signed in to change notification settings - Fork 2
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
feature request: Support promises #5
Comments
@michael-ts hi, you mean the promise wrapper has to hard-code some C++ parts? I used to think that promise wrapper is only some JS wrapper around the library -- |
Sorry for the misunderstanding if exists, I meant I totally agree the feature request. And my suggestion is to make another library that based on cross-sqlcipher, and provide promise support, is it right? |
I mean, in the node-sqlite code it looks like it might do exactly what is wanted, except it is requiring 'sqlite3' instead of 'cross-sqlcipher'. Maybe there is some easy way to "trick" it into requiring 'cross-sqlcipher' instead? If not, I suppose a fork that simply does a string replace would work, but then somebody has to make the effort to detect and sync changes any time node-sqlite is updated. |
OK got it! Hmm... since the cross-sqlcipher is made to be API-compatible with node-sqlite3, In web-frontend, we already had some webpack settings to do it (alias), See also: Better local require() paths for Node.js I was recently doing the exact same thing in my node server stuff! |
@michael-ts oops, seems I was wrong, 'cause cross-sqlcipher itself depends on node-sqlite3 too, |
Now what I want to do is to provide a PR to node-sqlite, |
Looks like node-sqlite3 has a wrapper module called node-sqlite which provides promises. However, it seems the hard-code the sqlite3 module. Since cross-sqlcipher is ultimately based on node-sqlite3, maybe some of this effort could be re-used?
The text was updated successfully, but these errors were encountered: