Open WildEgo opened 3 years ago
Hey @WildEgo,
could you please provide more infos
Thanks!
I'm thinking of playing with this SaaS framework so I was wondering, can I change the database connection on the fly, for example one request has Conn1 and the other has a Conn2, they connect thru a middleware and the data should be accessible on the resolver
Yes, that's possible!
You can just use the gorm plugin https://github.com/go-gorm/dbresolver or multiple db instances on a Acme struct (highly recommended)
Yes, that's possible!
You can just use the gorm plugin https://github.com/go-gorm/dbresolver or multiple db instances on a Acme struct
Thank you for the quick reply, I've looked a bit into DBResolver and it looked like it couldn't really do it since I got the data in the runtime, I've never tried that last one could you send me a couple of links? I was trying at the moment by running the connect function again but it got overwritten at the time it got to the resolver
I am currently at vacation! I will update the demo on next Monday because multiple people got stuck at this point
I am currently at vacation! I will update the demo on next Monday because multiple people got stuck at this point
Thank you mate I didn't know, take ur time and enjoy ur vacation, thank u for this library, I've been going thru it and learning more GO thanks to it, truly appreciate ur work
Hey guys was looking at this and seemed interesting, I was wondering can I change the database context on the fly?
Thank in advance!