Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ Examples:

| Arg | Description |
| ----------------- | ------------------------------------ |
| `tenant` | Tenant ID, Databend Cloud only. |
| `warehouse` | Warehouse name, Databend Cloud only. |
| `sslmode` | Set to `disable` if not using tls. |
| `tls_ca_file` | Custom root CA certificate path. |
Expand Down
4 changes: 4 additions & 0 deletions core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ pub struct APIClient {

auth: Arc<dyn Auth>,

/// Tenant ID used only in Databend Cloud management mode.
/// This is NOT for specifying tenant in normal usage.
tenant: Option<String>,
warehouse: Mutex<Option<String>>,
session_state: Mutex<SessionState>,
Expand Down Expand Up @@ -311,6 +313,8 @@ impl APIClient {
};
client.set_presign_mode(presign_mode);
}
// NOTE: `tenant` is only used in Databend Cloud management mode.
// It is not intended for daily use to specify a tenant.
"tenant" => {
client.tenant = Some(v.to_string());
}
Expand Down
4 changes: 4 additions & 0 deletions driver/src/flight_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ struct Args {
user: String,
password: SensitiveString,
database: Option<String>,
/// Tenant ID used only in Databend Cloud management mode.
/// This is NOT for specifying tenant in normal usage.
tenant: Option<String>,
warehouse: Option<String>,
tls: bool,
Expand Down Expand Up @@ -284,6 +286,8 @@ impl Args {
let mut scheme = "https";
for (k, v) in u.query_pairs() {
match k.as_ref() {
// NOTE: `tenant` is only used in Databend Cloud management mode.
// It is not intended for daily use to specify a tenant.
"tenant" => args.tenant = Some(v.to_string()),
"warehouse" => args.warehouse = Some(v.to_string()),
"sslmode" => match v.as_ref() {
Expand Down
Loading