I'm learning rust and I've written my first very simple API using Rocket. Now I'd like to connect my server to an existing database I've got on MSFT Azure. I'm having a hard time finding examples on how this works for Mssql, the SQLx repository only contains examples for Postgres and MySQL.
There is no connection string on the Azure Portal available for rust, so I've experimented with different versions for Go and ODBC:
const SERVER: &str = "<mysqlserver>.database.windows.net";
const PORT: &str = "1433";
const USER: &str = "sqladmin";
const PASSWORD: &str = "<mypassword>";
const DATABASE: &str = "<mydatabase>";
MssqlConnection::connect(&format!("server={};user id={};password={};port={};database={};", SERVER, USER, PASSWORD, PORT, DATABASE)[..]).await?;
This gives an Error: Configuration(RelativeUrlWithoutBase)
so I think SQLx expects a connection string like "postgres://..."
, I can't find this string for mssql though.