Fix the SurrealKV scheme in the CLI (#3551)
This commit is contained in:
parent
b52d630c4b
commit
429ca31faa
1 changed files with 3 additions and 3 deletions
|
@ -15,6 +15,7 @@ pub(crate) fn path_valid(v: &str) -> Result<String, String> {
|
|||
v if v.starts_with("file:") => Ok(v.to_string()),
|
||||
v if v.starts_with("rocksdb:") => Ok(v.to_string()),
|
||||
v if v.starts_with("speedb:") => Ok(v.to_string()),
|
||||
v if v.starts_with("surrealkv:") => Ok(v.to_string()),
|
||||
v if v.starts_with("tikv:") => Ok(v.to_string()),
|
||||
v if v.starts_with("fdb:") => Ok(v.to_string()),
|
||||
_ => Err(String::from("Provide a valid database path parameter")),
|
||||
|
@ -45,9 +46,8 @@ pub(crate) fn endpoint_valid(v: &str) -> Result<String, String> {
|
|||
|
||||
let scheme = split_endpoint(v).0;
|
||||
match scheme {
|
||||
"http" | "https" | "ws" | "wss" | "fdb" | "mem" | "rocksdb" | "file" | "tikv" => {
|
||||
Ok(v.to_string())
|
||||
}
|
||||
"http" | "https" | "ws" | "wss" | "fdb" | "mem" | "rocksdb" | "speedb" | "surrealkv"
|
||||
| "file" | "tikv" => Ok(v.to_string()),
|
||||
_ => Err(String::from("Provide a valid database connection string")),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue