sofa icon indicating copy to clipboard operation
sofa copied to clipboard

client db function only accepts literal strings

Open bosscar opened this issue 7 years ago • 0 comments

https://github.com/YellowInnovation/sofa/blob/93d91e9c45972aaa3e97eece83f8af6ef1208c9f/src/client.rs#L89

The db function in the client accepts dbname has a literal string only. This force the user to provide only a literal string and not provide a value from environment or configuration file. Please refer to this thread for more details: https://users.rust-lang.org/t/solved-pass-a-string-literal-in-rust/23796

I had to workaround this limitation. Is it possible to reconsider the type of this input field?

Thanks, bosscar

bosscar avatar Jan 03 '19 02:01 bosscar