Struct prql_compiler::sql::Options

source ·
pub struct Options {
    pub format: bool,
    pub dialect: Option<Dialect>,
    pub signature_comment: 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.

§dialect: Option<Dialect>

Target dialect you want to compile for.

Because PRQL compiles to a subset of SQL, not all SQL features are required for PRQL. This means that generic dialect may work with most databases.

If something does not work in dialect you need, please report it at GitHub issues.

If None is used, sql_dialect flag from query definition is used. If it does not exist, Dialect::Generic is used.

§signature_comment: bool

Emits the compiler signature as a comment after generated SQL

Defaults to true.

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
The number of items that this chain link consists of.
Append the elements in this link to the chain.
An iterator over the items within this container, by value.
Iterate over the elements of the container (using internal iteration because GATs are unstable).

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.