Expand description
Configuration file parsing and merged configuration for cqlsh-rs.
Handles ~/.cassandra/cqlshrc (INI format) parsing, environment variable loading,
and merging with CLI arguments following the precedence rule:
CLI > environment variables > cqlshrc > defaults.
Many fields are defined ahead of their use in later development phases.
StructsΒ§
- Authentication
Section - Connection
Section - Copy
From Section - Copy
Section - Copy
ToSection - CqlSection
- Cqlshrc
Config - Represents the parsed contents of a cqlshrc INI file.
- CsvSection
- EnvConfig
- Load environment variables relevant to cqlsh.
- Merged
Config - The fully resolved configuration after merging CLI args, environment variables, cqlshrc file, and defaults. Follows precedence: CLI > env > cqlshrc > defaults.
- SslSection
- Tracing
Section - UiSection
EnumsΒ§
- Color
Mode - Config
Error - Errors specific to configuration loading.
ConstantsΒ§
- DEFAULT_
CONNECT_ πTIMEOUT - Default connect timeout in seconds (matches Python cqlsh).
- DEFAULT_
HOST π - Default host.
- DEFAULT_
PORT π - Default port.
- DEFAULT_
REQUEST_ πTIMEOUT - Default request timeout in seconds (matches Python cqlsh).
FunctionsΒ§
- default_
cqlshrc_ path - Return the default cqlshrc path: ~/.cassandra/cqlshrc
- load_
config - Load the full configuration pipeline: resolve path β load cqlshrc β read env β merge.
- parse_
bool π - Parse boolean values in the same way Python cqlsh does: βtrueβ, βyesβ, βonβ, β1β β true, everything else β false.
- resolve_
cqlshrc_ path - Resolve the cqlshrc file path based on CLI flag or default location.