sqlload 0.26.0

SQL data loading tooling. Pre-release, under development.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! The account endpoint.

use crate::config::models::DestinationConfig;

/// `base_url` when configured, otherwise `https://<account>.snowflakecomputing.com` with `_` written as `-`.
pub fn account_url(destination: &DestinationConfig) -> String {
    match &destination.base_url {
        Some(url) => url.trim_end_matches('/').to_owned(),
        None => format!(
            "https://{}.snowflakecomputing.com",
            destination.account.to_ascii_lowercase().replace('_', "-")
        ),
    }
}