Skip to main content

resolve_schema_patterns

Function resolve_schema_patterns 

Source
pub fn resolve_schema_patterns<'a>(
    patterns: impl IntoIterator<Item = &'a str>,
) -> Result<Vec<PathBuf>, Error>
Expand description

Resolves schema paths and glob patterns to the files they name.

Every listed path must exist, and every glob pattern must be valid, read cleanly and match at least one file. Reading fewer schema files than the config lists would make push and generate treat the missing tables as removed.

ยงErrors

Returns Error::SchemaPathNotFound for a path that does not exist, Error::Glob for an invalid pattern, Error::GlobRead when expanding a pattern fails, and Error::SchemaPatternMatchedNothing for a pattern that matches no file.