tungus icon indicating copy to clipboard operation
tungus copied to clipboard

Rewrite: Added mongoose 4 / 5 compatibility

Open Root-Core opened this issue 6 years ago • 1 comments

Hello there,

i've achieved to adapt Tungus to work with newer mongoose incarnations as discussed in #15 , which ended in a full rewrite. This has been tested in a bigger project and works pretty good on Windows and Linux.

The support of mongoose 3 has been dropped though (as I've never tested it with this rewrite / the API changed a lot on mongooses side AND the support has ended a while ago).


The current state of TingoDB works well in our bigger project. There might be some use cases, that need modifications to the TingoDB API, but in the most cases it does the job.

One thing needs to be patched in the TingoDB: https://github.com/sergeyksv/tingodb/pull/159

If it gets rejected, we could build a thin layer to wrap the returned object or you can just use my branch of TingoDB in your package.json.


About the implementation:

It is kind of future proof, as it overrides all high level connection functions. This prevents connections to the MongoDB early and effective, also it is more independent form changes made in higher level functions. It suppresses some warnings, that do not apply to the TingoDB.

Also it mimics the mongoose mongodb-native-drivers behavior as closely as possible while staying true to the high level approach. This will hopefully make updates on mongoose work, without adaption.

It was tested in "real life" on Windows 7 / 10 on x64 and Debian Linux on ARMv7. Some things got fixed in order to work properly on Windows (symlinks etc.).


Feedback is welcome. Regards, root-core.

Root-Core avatar Mar 25 '18 01:03 Root-Core

Is it possible to review this PR, as I need Tingo and Mongoose together? Do you need help?

Thank you

dlecan avatar May 09 '18 08:05 dlecan