cargo fmt
This commit is contained in:
parent
65b12caa7f
commit
99a1fe01fc
@ -19,17 +19,13 @@ pub struct ExecErr;
|
|||||||
impl ExecResult {
|
impl ExecResult {
|
||||||
pub fn last_insert_id(&self) -> u64 {
|
pub fn last_insert_id(&self) -> u64 {
|
||||||
match &self.result {
|
match &self.result {
|
||||||
ExecResultHolder::SqlxMySql(result) => {
|
ExecResultHolder::SqlxMySql(result) => result.last_insert_id(),
|
||||||
result.last_insert_id()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn rows_affected(&self) -> u64 {
|
pub fn rows_affected(&self) -> u64 {
|
||||||
match &self.result {
|
match &self.result {
|
||||||
ExecResultHolder::SqlxMySql(result) => {
|
ExecResultHolder::SqlxMySql(result) => result.rows_affected(),
|
||||||
result.rows_affected()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,8 @@ impl fmt::Display for Statement {
|
|||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match &self.values {
|
match &self.values {
|
||||||
Some(values) => {
|
Some(values) => {
|
||||||
let string = inject_parameters(
|
let string =
|
||||||
&self.sql,
|
inject_parameters(&self.sql, values.0.clone(), &MySqlQueryBuilder::default());
|
||||||
values.0.clone(),
|
|
||||||
&MySqlQueryBuilder::default(),
|
|
||||||
);
|
|
||||||
write!(f, "{}", &string)
|
write!(f, "{}", &string)
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use sqlx::{mysql::{MySqlRow, MySqlArguments, MySqlQueryResult}, MySql, MySqlPool};
|
use sqlx::{
|
||||||
|
mysql::{MySqlArguments, MySqlQueryResult, MySqlRow},
|
||||||
|
MySql, MySqlPool,
|
||||||
|
};
|
||||||
|
|
||||||
sea_query::sea_query_driver_mysql!();
|
sea_query::sea_query_driver_mysql!();
|
||||||
use sea_query_driver_mysql::bind_query;
|
use sea_query_driver_mysql::bind_query;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user