Skip to content

How to switch database in runtime? #283

Closed Answered by Brendonovich
Dennis-Zhang-SH asked this question in Q&A
Discussion options

You must be logged in to vote

PCR is only designed to be used with one type of database at a time, since the generated client can be different for each database. If you want to switch reliably then you'd need to regenerate the client and go from there. I guess you could swap out the connection url and enable the new database via cargo features, but I really wouldn't recommend it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Dennis-Zhang-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants