pub(crate) struct Modifiers {
is_monotone: Option<Expr>,
sqlname: Option<SqlName>,
preserves_uniqueness: Option<Expr>,
inverse: Option<Expr>,
negate: Option<Expr>,
is_infix_op: Option<Expr>,
output_type: Option<Path>,
output_type_expr: Option<Expr>,
could_error: Option<Expr>,
propagates_nulls: Option<Expr>,
introduces_nulls: Option<Expr>,
}
Expand description
Modifiers passed as key-value pairs to the #[sqlfunc]
macro.
Fields§
§is_monotone: Option<Expr>
An optional expression that evaluates to a boolean indicating whether the function is monotone with respect to its arguments. Defined for unary and binary functions.
sqlname: Option<SqlName>
The SQL name for the function. Applies to all functions.
preserves_uniqueness: Option<Expr>
Whether the function preserves uniqueness. Applies to unary functions.
inverse: Option<Expr>
The inverse of the function, if it exists. Applies to unary functions.
negate: Option<Expr>
The negated function, if it exists. Applies to binary functions.
is_infix_op: Option<Expr>
Whether the function is an infix operator. Applies to binary functions, and needs to be specified.
output_type: Option<Path>
The output type of the function, if it cannot be inferred. Applies to all functions.
output_type_expr: Option<Expr>
The output type of the function as an expression. Applies to binary functions.
could_error: Option<Expr>
Optional expression evaluating to a boolean indicating whether the function could error. Applies to all functions.
propagates_nulls: Option<Expr>
Whether the function propagates nulls. Applies to binary functions.
introduces_nulls: Option<Expr>
Whether the function introduces nulls. Applies to all functions.
Trait Implementations§
Source§impl FromMeta for Modifiers
impl FromMeta for Modifiers
Source§fn from_list(__items: &[NestedMeta]) -> Result<Self>
fn from_list(__items: &[NestedMeta]) -> Result<Self>
fn from_nested_meta(item: &NestedMeta) -> Result<Self, Error>
Source§fn from_meta(item: &Meta) -> Result<Self, Error>
fn from_meta(item: &Meta) -> Result<Self, Error>
syn::Meta
by dispatching to the format-appropriate
trait function. This generally should not be overridden by implementers. Read moreSource§fn from_none() -> Option<Self>
fn from_none() -> Option<Self>
from_none
is used to attempt
recovery before a missing field error is generated. Read moreSource§fn from_word() -> Result<Self, Error>
fn from_word() -> Result<Self, Error>
Source§fn from_value(value: &Lit) -> Result<Self, Error>
fn from_value(value: &Lit) -> Result<Self, Error>
foo = "bar"
or foo("bar")
.
This dispatches to the appropriate method based on the type of literal encountered,
and generally should not be overridden by implementers. Read more