pub struct Compound {
pub op: Option<CompoundOp>,
pub query: Option<Expr>,
}Expand description
One operand of a compound SELECT: UNION ALL <select-core>.
The operand is not parenthesised, and that is the whole reason this type
exists instead of Combine. SQLite’s
compound-select-stmt is a sequence of bare select-cores:
select-core ( compound-operator select-core )*A parenthesised select is only a table-or-subquery in SQLite, never a
compound operand, so (SELECT 1) UNION (SELECT 2) is a syntax error — verified
against SQLite’s own parser and against a real SQLite. PostgreSQL parenthesises
every operand so that one may carry its own ORDER BY/LIMIT; SQLite cannot
express that at all, and correspondingly has no need for the _combined mods
keelson_psql carries.
Fields§
§op: Option<CompoundOp>Which operator. None is how a default-constructed operand stays absent.
query: Option<Expr>The operand, rendered bare.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Compound
impl !UnwindSafe for Compound
impl Freeze for Compound
impl Send for Compound
impl Sync for Compound
impl Unpin for Compound
impl UnsafeUnpin for Compound
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