pub struct Runner { /* private fields */ }
Implementations§
Methods from Deref<Target = Conn>§
Sourcepub fn connection_id(&self) -> u32
pub fn connection_id(&self) -> u32
Returns connection identifier.
Sourcepub fn affected_rows(&self) -> u64
pub fn affected_rows(&self) -> u64
Returns number of rows affected by the last query.
Sourcepub fn last_insert_id(&self) -> u64
pub fn last_insert_id(&self) -> u64
Returns last insert id of the last query.
Returns zero if there was no last insert id.
Sourcepub fn info_str(&self) -> Cow<'_, str>
pub fn info_str(&self) -> Cow<'_, str>
Info, reported by the server.
Will be empty if not defined.
Sourcepub fn ping(&mut self) -> bool
pub fn ping(&mut self) -> bool
Executes COM_PING
on Conn
. Return true
on success or false
on error.
Sourcepub fn select_db(&mut self, schema: &str) -> bool
pub fn select_db(&mut self, schema: &str) -> bool
Executes COM_INIT_DB
on Conn
.
Sourcepub fn start_transaction(
&mut self,
tx_opts: TxOpts,
) -> Result<Transaction<'_>, Error>
pub fn start_transaction( &mut self, tx_opts: TxOpts, ) -> Result<Transaction<'_>, Error>
Starts new transaction with provided options.
readonly
is only available since MySQL 5.6.5.
Sourcepub fn set_local_infile_handler(&mut self, handler: Option<LocalInfileHandler>)
pub fn set_local_infile_handler(&mut self, handler: Option<LocalInfileHandler>)
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 Write
able 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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runner
impl RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl UnwindSafe for Runner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more