pub enum StatementType<'a> {
    Select {
        columns: Vec<SelectTypeColumn<'a>>,
        arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
    },
    Delete {
        arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
    },
    Insert {
        yield_autoincrement: AutoIncrementId,
        arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
        returning: Option<Vec<SelectTypeColumn<'a>>>,
    },
    Update {
        arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
    },
    Replace {
        arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
        returning: Option<Vec<SelectTypeColumn<'a>>>,
    },
    Invalid,
}
Expand description

Type information of typed statement

Variants§

§

Select

Fields

§columns: Vec<SelectTypeColumn<'a>>

The types and named of the columns return from the select

§arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>

The key and type of arguments to the query

The statement was a select statement

§

Delete

Fields

§arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>

The key and type of arguments to the query

The statement is a delete statement

§

Insert

Fields

§yield_autoincrement: AutoIncrementId

The insert happend in a table with a auto increment id row

§arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>

The key and type of arguments to the query

§returning: Option<Vec<SelectTypeColumn<'a>>>

If present, the types and names of the columns returned from the insert

The statement is an insert statement

§

Update

Fields

§arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>

The key and type of arguments to the query

The statement is a update statement

§

Replace

Fields

§arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>

The key and type of arguments to the query

§returning: Option<Vec<SelectTypeColumn<'a>>>

If present, the types and names of the columns returned from the replace

The statement is a replace statement

§

Invalid

The query was not valid, errors are preset in issues

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

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

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.