Struct prql_compiler::Options
source · pub struct Options {
pub format: bool,
pub target: Target,
pub signature_comment: bool,
pub color: bool,
}
Expand description
Compilation options for SQL backend of the compiler.
Fields§
§format: bool
Pass generated SQL string trough a formatter that splits it into multiple lines and prettifies indentation and spacing.
Defaults to true.
target: Target
Target and dialect to compile to.
signature_comment: bool
Emits the compiler signature as a comment after generated SQL
Defaults to true.
color: bool
Whether to use ANSI colors in error messages. This is deprecated and has no effect.
Instead, in order of preference:
- Use a library such as
anstream
to encapsulate the presentation logic. - Set an environment variable such as
CLI_COLOR=0
to disable any colors coming back from this library. - Strip colors from the output (possibly also with a library such as
anstream
)
Implementations§
source§impl Options
impl Options
pub fn with_format(self, format: bool) -> Options
pub fn no_format(self) -> Options
pub fn with_signature_comment(self, signature_comment: bool) -> Options
pub fn no_signature(self) -> Options
pub fn with_target(self, target: Target) -> Options
pub fn with_color(self, color: bool) -> Options
👎Deprecated:
color
now has no effect; see Options
docs for more detailsTrait Implementations§
source§impl<'de> Deserialize<'de> for Options
impl<'de> Deserialize<'de> for Options
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Options, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Options, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Options
impl Serialize for Options
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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