(cmd: &RespCommand, session: &mut RespSession)
| 84 | } |
| 85 | |
| 86 | fn handle_select(cmd: &RespCommand, session: &mut RespSession) -> RespValue { |
| 87 | match cmd.arg_str(0) { |
| 88 | Some(name) => { |
| 89 | session.collection = name.to_string(); |
| 90 | RespValue::ok() |
| 91 | } |
| 92 | None => RespValue::err("ERR wrong number of arguments for 'select' command"), |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | /// AUTH [username] password |
| 97 | /// |