Struct sqruff_lib::core::config::FluffConfig
source · pub struct FluffConfig { /* private fields */ }
Expand description
The class that actually gets passed around as a config object.
Implementations§
source§impl FluffConfig
impl FluffConfig
pub fn get(&self, key: &str, section: &str) -> &Value
pub fn get_section(&self, section: &str) -> &AHashMap<String, Value>
pub fn new( configs: AHashMap<String, Value>, extra_config_path: Option<String>, indentation: Option<FluffConfigIndentation> ) -> Self
pub fn with_sql_file_exts(self, exts: Vec<String>) -> Self
sourcepub fn from_root(
extra_config_path: Option<String>,
ignore_local_config: bool,
_overrides: Option<AHashMap<String, String>>
) -> Result<FluffConfig, SQLFluffUserError>
pub fn from_root( extra_config_path: Option<String>, ignore_local_config: bool, _overrides: Option<AHashMap<String, String>> ) -> Result<FluffConfig, SQLFluffUserError>
Loads a config object just based on the root directory.
pub fn from_kwargs( config: Option<FluffConfig>, dialect: Option<Dialect>, rules: Option<Vec<String>> ) -> Self
sourcepub fn process_raw_file_for_config(&self, raw_str: &str)
pub fn process_raw_file_for_config(&self, raw_str: &str)
Process a full raw file for inline config and update self.
sourcepub fn process_inline_config(&self, _config_line: &str)
pub fn process_inline_config(&self, _config_line: &str)
Process an inline config command and update self.
sourcepub fn verify_dialect_specified(&self) -> Option<SQLFluffUserError>
pub fn verify_dialect_specified(&self) -> Option<SQLFluffUserError>
Check if the config specifies a dialect, raising an error if not.
pub fn get_dialect(&self) -> &Dialect
pub fn sql_file_exts(&self) -> &[String]
Trait Implementations§
source§impl Clone for FluffConfig
impl Clone for FluffConfig
source§fn clone(&self) -> FluffConfig
fn clone(&self) -> FluffConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FluffConfig
impl Debug for FluffConfig
source§impl Default for FluffConfig
impl Default for FluffConfig
source§impl PartialEq for FluffConfig
impl PartialEq for FluffConfig
source§fn eq(&self, other: &FluffConfig) -> bool
fn eq(&self, other: &FluffConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FluffConfig
Auto Trait Implementations§
impl Freeze for FluffConfig
impl !RefUnwindSafe for FluffConfig
impl !Send for FluffConfig
impl Sync for FluffConfig
impl Unpin for FluffConfig
impl !UnwindSafe for FluffConfig
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more