Open JimLynchCodes opened 4 years ago
Hi, and thanks for your interest.
So when we first created refinery it was for relational databases, therefore the Transaction
and Query
traits.
That being said, support for NoSql databases such mongodb could be a super interesting addition
Would you be willing to tackle this?
I'm still a noob Rust dev and haven't look into the internals of this package at all so... I'm probably not the right person to do it. 😅
No worries, If you want to give it a try and have any questions I am on the Rust discord!
Alright, thanks @jxs I'll try to find you on discord. :)
I think the "Query" side could work with Mongo with a very similar API after just changing "table" to "document" or "doc" and allowing Mongo-specific types like ObjectId and IsoDate.
Also, maybe a dumb question, but as a user of this library are you supposed to code out by hand the migration functions (eg. this one)? It is possible somehow to generate the migration implementation from changes to some special struct?
Transactions would be great as well although I think it is still under development for the official mongodb rust driver.
I think the "Query" side could work with Mongo with a very similar API after just changing "table" to "document" or "doc" and allowing Mongo-specific types like ObjectId and IsoDate.
you need to also implement Transaction
as migrate
requires T: Transaction, though it doesn't need to be a transaction if the driver doesn't support it.
Also, maybe a dumb question, but as a user of this library are you supposed to code out by hand the migration functions (eg. this one)? It is possible somehow to generate the migration implementation from changes to some special struct?
you can either have migrations from a rust module, or from a .sql
file, In Mongo's case it should be a .json
@jxs Could you please share your discord username? Mine is IgnisDa#5244.
I would like to implement migrations for surrealdb and I think this library could be helpful.
Hi, sorry if this already answered here somewhere, but I am curious if support for mongodb and other NoSql databases is on the roadmap or if I should be looking at another tool for doing mongo migrations for my rust micro-services.
Thanks!