Skip to main content

Bound

Enum Bound 

Source
pub enum Bound {
    Query(Plan),
    CreateTable(CreateTable),
    CreateView(CreateView),
    DropTable(DropTable),
    Insert(Insert),
    Setting(Setting),
    Explain(Plan),
}
Expand description

One statement, bound.

Not #[non_exhaustive]. A new variant here is a new kind of statement, and the compiler pointing at every place that has to decide what to do with it is the whole value of the enum.

Variants§

§

Query(Plan)

A query, which is the only one of these that produces rows.

§

CreateTable(CreateTable)

CREATE TABLE.

§

CreateView(CreateView)

CREATE VIEW.

§

DropTable(DropTable)

DROP TABLE or DROP VIEW.

§

Insert(Insert)

INSERT INTO.

§

Setting(Setting)

SET name = value, or RESET name, which is the same thing with no value.

§

Explain(Plan)

EXPLAIN over a query, holding the plan of the query rather than the query.

The same Plan a Bound::Query would have carried, bound the same way and by the same code. What makes it an explain is that the layer above optimizes it and prints it instead of running it, which is the point: a plan that was built differently because somebody asked to see it is not the plan that runs.

Trait Implementations§

Source§

impl Debug for Bound

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Bound

§

impl RefUnwindSafe for Bound

§

impl Send for Bound

§

impl Sync for Bound

§

impl Unpin for Bound

§

impl UnsafeUnpin for Bound

§

impl UnwindSafe for Bound

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.