You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a utility I am writing that will be connecting to multiple databases most MySQL and one Postgres and read data out and store the data in another format in another database. Looking at documentation and the source code it doesn't seem obvious if there is a way to support this scenario. The only possibility that comes to mind is to setup a workspace and somehow dynamically change the environment variable when building separate library packages. Would that be the only approach right now or am I missing something?
We do want to support this. We were thinking a decent approach would be to generate a set of macros with a higher level macro.. e.g.,
mod one { sqlx::database!(env!("ONE_DATABASE_URL"));}mod two { sqlx::database!(env!("TWO_DATABASE_URL"));}
one::query!("...")// mysql://...
two::query!("...")// postgres://...
Activity
mehcode commentedon Apr 3, 2020
That is correct.
See here: #121 (comment)
We do want to support this. We were thinking a decent approach would be to generate a set of macros with a higher level macro.. e.g.,