build_prompt

Function build_prompt 

Source
pub fn build_prompt(username: Option<&str>, keyspace: Option<&str>) -> String
Expand description

Build the primary prompt string matching Python cqlsh format.

Format: [username@]cqlsh[:keyspace]>

Examples:

  • cqlsh> (no user, no keyspace)
  • cqlsh:my_ks> (with keyspace)
  • admin@cqlsh> (with username)
  • admin@cqlsh:my_ks> (with username and keyspace)