pub struct SqlSource { /* private fields */ }Expand description
Holds the optional path and content of the sql to be parsed
Implementations§
Source§impl SqlSource
impl SqlSource
Sourcepub const fn from_str(content: String, path: Option<PathBuf>) -> Self
pub const fn from_str(content: String, path: Option<PathBuf>) -> Self
Creates an SqlSource from a a String and a Option<PathBuf>
Sourcepub fn path_into_path_buf(&self) -> Option<PathBuf>
pub fn path_into_path_buf(&self) -> Option<PathBuf>
Returns the PathBuf for the current path
Sourcepub fn sql_sources(path: &Path, deny_list: &[String]) -> Result<Vec<Self>>
pub fn sql_sources(path: &Path, deny_list: &[String]) -> Result<Vec<Self>>
Recursively discovers .sql files under path, applies the optional
deny list, and loads the contents of each file.
§Parameters
path: Root directory to scan recursively for.sqlfiles.deny_list: Optional list of path-like strings representing files
§Errors
Returns an io::Error if directory traversal fails or if any of the
discovered SQL files cannot be read.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SqlSource
impl RefUnwindSafe for SqlSource
impl Send for SqlSource
impl Sync for SqlSource
impl Unpin for SqlSource
impl UnwindSafe for SqlSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more