[][src]Struct mysql_async::Conn

pub struct Conn { /* fields omitted */ }

Methods

impl Conn[src]

pub fn last_insert_id(&self) -> Option<u64>[src]

Returns the ID generated by a query (usually INSERT) on a table with a column having the AUTO_INCREMENT attribute. Returns None if there was no previous query on the connection or if the query did not update an AUTO_INCREMENT value.

pub fn affected_rows(&self) -> u64[src]

Returns the number of rows affected by the last INSERT, UPDATE, REPLACE or DELETE query.

pub fn new<T: Into<Opts>>(opts: T) -> impl MyFuture<Conn>[src]

Returns future that resolves to Conn.

pub fn from_url<T: AsRef<str>>(url: T) -> impl MyFuture<Conn>[src]

Returns future that resolves to Conn.

pub fn reset(self) -> impl MyFuture<Conn>[src]

Returns future that resolves to a Conn with COM_RESET_CONNECTION executed on it.

Trait Implementations

impl Queryable for Conn[src]

fn ping(self) -> BoxFuture<Self>[src]

Returns future that resolves to Conn if COM_PING executed successfully.

fn disconnect(self) -> BoxFuture<()>[src]

Returns future that disconnects this connection from a server.

fn query<Q: AsRef<str>>(
    self,
    query: Q
) -> BoxFuture<QueryResult<Self, TextProtocol>>
[src]

Returns future that performs query.

fn first<Q, R>(self, query: Q) -> BoxFuture<(Self, Option<R>)> where
    Q: AsRef<str>,
    R: FromRow
[src]

Returns future that resolves to a first row of result of a query execution (if any). Read more

fn drop_query<Q: AsRef<str>>(self, query: Q) -> BoxFuture<Self>[src]

Returns future that performs query. Result will be dropped.

fn prepare<Q: AsRef<str>>(self, query: Q) -> BoxFuture<Stmt<Self>>[src]

Returns future that prepares statement.

fn prep_exec<Q, P>(
    self,
    query: Q,
    params: P
) -> BoxFuture<QueryResult<Self, BinaryProtocol>> where
    Q: AsRef<str>,
    P: Into<Params>, 
[src]

Returns future that prepares and executes statement in one pass.

fn first_exec<Q, P, R>(
    self,
    query: Q,
    params: P
) -> BoxFuture<(Self, Option<R>)> where
    Q: AsRef<str>,
    P: Into<Params>,
    R: FromRow
[src]

Returns future that resolves to a first row of result of a statement execution (if any). Read more

fn drop_exec<Q, P>(self, query: Q, params: P) -> BoxFuture<Self> where
    Q: AsRef<str>,
    P: Into<Params>, 
[src]

Returns future that prepares and executes statement. Result will be dropped.

fn batch_exec<Q, I, P>(self, query: Q, params_iter: I) -> BoxFuture<Self> where
    Q: AsRef<str>,
    I: IntoIterator<Item = P> + Send + 'static,
    I::IntoIter: Send + 'static,
    Params: From<P>,
    P: Send + 'static, 
[src]

Returns future that prepares statement and performs batch execution. Results will be dropped. Read more

fn start_transaction(
    self,
    options: TransactionOptions
) -> BoxFuture<Transaction<Self>>
[src]

Returns future that starts transaction.

impl Drop for Conn[src]

impl Debug for Conn[src]

Auto Trait Implementations

impl Unpin for Conn

impl Send for Conn

impl Sync for Conn

impl !RefUnwindSafe for Conn

impl !UnwindSafe for Conn

Blanket Implementations

impl<T> ConnectionLike for T where
    T: ConnectionLike, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T