pub fn from_url(url: &Url) -> anyhow::Result<Self> {
        let name = url
            .path_segments()
            .ok_or(anyhow!("Failed to parse database name from URL"))?
            .next_back()
            .ok_or(anyhow!("Failed to parse database name from URL"))?;
        let url_without_db_name = {
            let mut url = url.clone();
            url.set_path("");
            url
        };
        Ok(Self {
            url: url_without_db_name,
            name: name.to_string(),
        })
    }
Create a new `Db` instance from a URL.
zkstack_cli/crates/common/src/db.rs