sqlite source must work with sqlite and file protocol
@@ -20,9 +20,11 @@ impl SourceDefinition for SqliteSourceDefinition {
url: StringFromEnvVar,
documentation: &Option<String>,
) -> Result<Box<dyn Source + Send + Sync>, String> {
+ let validation_with_file_protocol = validate_url(name, "file://", url.clone());
+ let validation_with_sqlite_protocol = validate_url(name, "sqlite://", url);
Ok(Box::new(SqliteSource {
name: String::from(name),
- url: validate_url(name, "sqlite://", url)?,
+ url: validation_with_file_protocol.or(validation_with_sqlite_protocol)?,
documentation: documentation.clone(),
}))
}
