Closed marknefedov closed 7 months ago
This is unfortunately harder than it should be right now. Moving this up to the top of the list of things to address.
Hi @marknefedov,
I have been working to cleanup what is required to make a generic binary that can support multiple databases at runtime. There is still work to go, but it is at least possible now.
I have added two examples that you might find useful: https://github.com/weldsorm/welds/blob/main/welds/examples/any_db_runtime.rs https://github.com/weldsorm/welds/blob/main/welds/examples/any_db_compiletime.rs
HI @marknefedov. its been a while with this ticket. You might want to checkout the latest version of welds. One of the main goals of 0.3
was to address this shortcoming.
Welds can now be 100% switched at runtime.
Hi, thank you for your hard work! In the docs I see that DB backend is configured using macro and while I assume it is possible to make switchable backends using cargo feature at compilation time, is there a way to distribute a single binary with all postgres, mysql and sqlite support at the same time, so database can be specified in the config?