You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 11, 2021. It is now read-only.
@@ -83,15 +89,24 @@ impl<'s> CommandV2<'s> for Statement<'s> {
83
89
"UPDATE" => Action::Update,
84
90
"NEW" => Action::New,
85
91
"SHOW" => Action::Show,
92
+
"LIST" => Action::List,
86
93
_ => returnErr(RediSQLError::with_code(23,
87
94
"You provide a command for the statement that is not supported".to_string(),
88
95
"Statement command unknow".to_string()))
89
96
}
90
97
}
91
98
};
92
-
let stmt_name = match args_iter.next(){
93
-
Some(s) => s,
94
-
None => returnErr(RediSQLError::with_code(19,"You should provide the name of the statement to operate with".to_string(),"Statement command with statement name".to_string())),
99
+
let stmt_name = match action {
100
+
Action::New
101
+
| Action::Update
102
+
| Action::Delete
103
+
| Action::Show => match args_iter.next(){
104
+
Some(s) => Some(*s),
105
+
None => {
106
+
returnErr(RediSQLError::with_code(19,"You should provide the name of the statement to operate with".to_string(),"Statement command with statement name".to_string()));
107
+
}
108
+
},
109
+
Action::List => None,
95
110
};
96
111
let stmt_query = match action {
97
112
Action::Update | Action::New => match args_iter.next(){
0 commit comments