sqlode/sql_paths
Shared .sql path expansion used by generate and verify.
A configured schema or queries entry may be either a direct
path to a .sql file or a directory of .sql files. This
module applies the expansion rules both commands rely on so the
CLI presents a single, consistent surface: directories expand
to their .sql children in ascii-sorted order, empty
directories fail, and errors carry the originating path so
callers can render diagnostics.
Values
pub fn expand(
paths: List(String),
error_fn: fn(String, String) -> error,
) -> Result(List(String), error)
Expand directory entries in paths into their .sql children.
File entries pass through unchanged. error_fn maps an
offending path and detail string into the caller’s error type
so each command can attach its own wrapping variant while the
underlying diagnostic text stays consistent.