GithubHelp home page GithubHelp logo

Comments (6)

fritx avatar fritx commented on May 21, 2024 1

Now what I want to do is to provide a PR to node-sqlite,
which supports a custom sqlite3 argument just like the Promise arg to custom the sqlite3 source.

from cross-sqlcipher.

fritx avatar fritx commented on May 21, 2024

@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 --
for example, we can write a library to wrap all the APIs of it.

from cross-sqlcipher.

fritx avatar fritx commented on May 21, 2024

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?

from cross-sqlcipher.

michael-ts avatar michael-ts commented on May 21, 2024

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.

from cross-sqlcipher.

fritx avatar fritx commented on May 21, 2024

OK got it! Hmm... since the cross-sqlcipher is made to be API-compatible with node-sqlite3,
I suggest that we just set an alias would be a best way!

In web-frontend, we already had some webpack settings to do it (alias),
in node, I guess we can use module-alias or require-alias.

See also: Better local require() paths for Node.js

I was recently doing the exact same thing in my node server stuff!

from cross-sqlcipher.

fritx avatar fritx commented on May 21, 2024

@michael-ts oops, seems I was wrong, 'cause cross-sqlcipher itself depends on node-sqlite3 too,
so an alias won't be the solution.

from cross-sqlcipher.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.