Struct mysql_async::Conn[][src]

pub struct Conn { /* fields omitted */ }

MySql server connection.

Implementations

impl Conn[src]

pub fn id(&self) -> u32[src]

Returns connection identifier.

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 info(&self) -> Cow<'_, str>[src]

Text information, as reported by the server in the last OK packet, or an empty string.

pub fn get_warnings(&self) -> u16[src]

Number of warnings, as reported by the server in the last OK packet, or 0.

pub fn server_version(&self) -> (u16, u16, u16)[src]

Returns server version.

pub fn opts(&self) -> &Opts[src]

Returns connection options.

pub async fn disconnect(self) -> Result<()>[src]

Disconnects this connection from server.

pub fn new<T: Into<Opts>>(opts: T) -> BoxFuture<'static, Conn>

Notable traits for BoxFuture<'_, T>

impl<T> Future for BoxFuture<'_, T> type Output = Result<T>;
[src]

Returns a future that resolves to Conn.

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

Returns a future that resolves to Conn.

pub async fn reset(&mut self) -> Result<()>[src]

Executes COM_RESET_CONNECTION on self.

If server version is older than 5.7.2, then it'll reconnect.

impl Conn[src]

pub async fn start_transaction(
    &mut self,
    options: TxOpts
) -> Result<Transaction<'_>>
[src]

Starts a transaction.

Trait Implementations

impl Debug for Conn[src]

impl Drop for Conn[src]

impl Queryable for Conn[src]

impl<'a> ToConnection<'a, 'static> for &'a mut Conn[src]

impl ToConnection<'static, 'static> for Conn[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,