ClickHouse / ClickHouse/adbc_clickhouse
Implement `Connection::set_option()`
- Dominant language
- Rust
- Stars
- 25
- Forks
- 8
- Avg merge
- 2d 37m
- Merged PRs (30d)
- 4
Description
Support setting the following options per-connection:
```rust
pub enum OptionConnection {
/// Whether autocommit is enabled.
AutoCommit,
/// Whether the current connection should be restricted to being read-only.
ReadOnly,
/// The catalog used by the connection.
/// # Since
/// ADBC API revision 1.1.0
CurrentCatalog,
/// The database schema used by the connection.
/// # Since
/// ADBC API revision 1.1.0
CurrentSchema,
/// The isolation level of the connection. See [IsolationLevel].
IsolationLevel,
/// Driver-specific key.
Other(String),
}
```
We can return a `NotImplemented` error for `AutoCommit` until ClickHouse transactional support hits GA.
I'm not sure if we could support `IsolationLevel` since it doesn't look like it'll be possible to _explicitly_ set the isolation level of a transaction: https://github.com/ClickHouse/clickhouse-docs/issues/2300
The other options should map naturally to ClickHouse settings, however.
We can probably treat `CurrentCatalog` and `CurrentSchema` as interchangeable (CH doesn't have "schemas" so this would just set the current database), though we could also let `CurrentCatalog` set the current _cluster_ in a distributed scenario. It might be better to have that explicitly be an `Other` option though.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.