[][src]Struct mysql::Conn

pub struct Conn(_);

Mysql connection.

Implementations

impl Conn[src]

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

Returns connection identifier.

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

Returns number of rows affected by the last query.

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

Returns last insert id of the last query.

Returns zero if there was no last insert id.

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

Returns number of warnings, reported by the server.

pub fn info_ref(&self) -> &[u8][src]

Info, reported by the server.

Will be empty if not defined.

pub fn info_str(&self) -> Cow<'_, str>[src]

Info, reported by the server.

Will be empty if not defined.

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

Creates new Conn.

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

Resets MyConn (drops state then reconnects).

pub fn ping(&mut self) -> bool[src]

Executes COM_PING on Conn. Return true on success or false on error.

pub fn select_db(&mut self, schema: &str) -> bool[src]

Executes COM_INIT_DB on Conn.

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

Starts new transaction with provided options. readonly is only available since MySQL 5.6.5.

pub fn set_local_infile_handler(&mut self, handler: Option<LocalInfileHandler>)[src]

Sets a callback to handle requests for local files. These are caused by using LOAD DATA LOCAL INFILE queries. The callback is passed the filename, and a Writeable object to receive the contents of that file. Specifying None will reset the handler to the one specified in the Opts for this connection.

pub fn no_backslash_escape(&self) -> bool[src]

Trait Implementations

impl Debug for Conn[src]

impl Drop for Conn[src]

impl Queryable for Conn[src]

Auto Trait Implementations

impl RefUnwindSafe for Conn

impl Send for Conn

impl Sync for Conn

impl Unpin for Conn

impl UnwindSafe for Conn

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>,