(
id: &str,
repl_export: Option<&ReplExport>,
_docs_entry: Option<&DocsCatalogEntry>,
)
| 1165 | } |
| 1166 | |
| 1167 | fn discover_sql_name( |
| 1168 | id: &str, |
| 1169 | repl_export: Option<&ReplExport>, |
| 1170 | _docs_entry: Option<&DocsCatalogEntry>, |
| 1171 | ) -> Result<String> { |
| 1172 | if id == "uuid_ossp" { |
| 1173 | return Ok("uuid-ossp".to_owned()); |
| 1174 | } |
| 1175 | if id == "vector" { |
| 1176 | return Ok("vector".to_owned()); |
| 1177 | } |
| 1178 | let control_file = discover_control_file(id, id, repl_export); |
| 1179 | if let Some(path) = control_file |
| 1180 | && path.is_file() |
| 1181 | && let Some(stem) = path.file_stem().and_then(|stem| stem.to_str()) |
| 1182 | { |
| 1183 | return Ok(stem.to_owned()); |
| 1184 | } |
| 1185 | Ok(id.to_owned()) |
| 1186 | } |
| 1187 | |
| 1188 | fn discover_control_file( |
| 1189 | id: &str, |
no test coverage detected