Expand description
Interactive REPL (Read-Eval-Print Loop) for cqlsh-rs.
Integrates rustyline for line editing, history, and prompt management. Mirrors the Python cqlsh interactive behavior including multi-line input, prompt formatting, and Ctrl-C/Ctrl-D handling.
StructsΒ§
- Shell
State π - Mutable shell state for commands like EXPAND, PAGING, and CAPTURE.
ConstantsΒ§
- CONTINUATION_
PROMPT π - Continuation prompt for multi-line input (matches Python cqlsh).
- DEFAULT_
HISTORY_ πDIR - Default history file path: ~/.cassandra/cql_history
- DEFAULT_
HISTORY_ πFILE - DEFAULT_
HISTORY_ πSIZE - Maximum history entries (matches Python cqlsh default).
FunctionsΒ§
- build_
prompt - Build the primary prompt string matching Python cqlsh format.
- dispatch_
input π - Dispatch a complete input line/statement to the session.
- execute_
source π - Execute a SOURCE file: read CQL statements and execute them sequentially.
- expand_
tilde π - Expand
~at the start of a path to the userβs home directory. - print_
help - Print a basic help message matching Python cqlsh style.
- print_
help_ topic - Print help for a specific topic.
- process_
line π - Process a single line of input through the REPL pipeline.
- resolve_
history_ πpath - Resolve the history file path.
- run
- Run the interactive REPL loop.
- strip_
quotes π - Strip surrounding single or double quotes from a string.