mongo icon indicating copy to clipboard operation
mongo copied to clipboard

Design and Planning

Open youyuanwu opened this issue 4 years ago • 7 comments

This issue is to discuss the planning of the mongo vlang driver.

  • Currently the implementation is a wrapper around the mongo-c-driver. Is it the long term solution?
  • Are we planning to develop a native vlang driver? Like mongo-go-driver?
  • Even if we keep the wrapping the mongo-c-driver, do we want a vlang native bson library? Similar to https://github.com/mongodb/mongo-go-driver/tree/master/bson
  • How to handler marshal and unmarshal between bson and vlang struct?

youyuanwu avatar Feb 16 '21 22:02 youyuanwu

  • Currently the implementation is a wrapper around the mongo-c-driver. Is it the long term solution? No
  • Are we planning to develop a native vlang driver? Like mongo-go-driver? I want to do it, but in the future
  • Even if we keep the wrapping the mongo-c-driver, do we want a vlang native bson library? Similar to https://github.com/mongodb/mongo-go-driver/tree/master/bson As the mongo driver, I want to do it, but in the future
  • How to handler marshal and unmarshal between bson and vlang struct? No idea by the moment

esquerbatua avatar Apr 05 '21 13:04 esquerbatua

There should be a private v wrap functionality that has not yet been released yet. Once it is available, all the wrapping of C code should be generated rather than manually implemented. If you @esquerbatua can get the wrapping now from the vlang maintainer, you can speed up the c wrapping dev process. Note that libsodium wrapper is auto generated: https://github.com/vlang/libsodium

youyuanwu avatar Apr 08 '21 20:04 youyuanwu

There are a pending PR with more functions, and a WIP branch with native bson

esquerbatua avatar Apr 08 '21 20:04 esquerbatua

I saw it, but I recommend generating all the C bindings. There are a lot more bindings in the c-driver's header file.

youyuanwu avatar Apr 08 '21 23:04 youyuanwu

Hello, Any news update on the planning of the mongo feature ? It would be nice to have example (tests) and installation procedure. Really looking forward to be able to access mongodb within a V program. For now I have not been unable to run the Mongodb example.

hubyhuby avatar Jun 10 '21 10:06 hubyhuby

Hi @hubyhuby I'm waiting to have a more stable version of V, with submodules working as expected to have a large organization since the first release.

esquerbatua avatar Jun 10 '21 11:06 esquerbatua

Hi @hubyhuby you have now more examples and installation process.

esquerbatua avatar Aug 21 '24 18:08 esquerbatua