Set clippy deny
This commit is contained in:
parent
a781cc6610
commit
7f38621c3c
@ -2,19 +2,22 @@ use crate::{
|
||||
debug_print, error::*, DatabaseConnection, DbBackend, ExecResult, MockDatabase, QueryResult,
|
||||
Statement, Transaction,
|
||||
};
|
||||
use std::fmt::Debug;
|
||||
use std::sync::{
|
||||
atomic::{AtomicUsize, Ordering},
|
||||
Mutex,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MockDatabaseConnector;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MockDatabaseConnection {
|
||||
counter: AtomicUsize,
|
||||
mocker: Mutex<Box<dyn MockDatabaseTrait>>,
|
||||
}
|
||||
|
||||
pub trait MockDatabaseTrait: Send {
|
||||
pub trait MockDatabaseTrait: Send + Debug {
|
||||
fn execute(&mut self, counter: usize, stmt: Statement) -> Result<ExecResult, DbErr>;
|
||||
|
||||
fn query(&mut self, counter: usize, stmt: Statement) -> Result<Vec<QueryResult>, DbErr>;
|
||||
|
@ -10,8 +10,10 @@ use crate::{debug_print, error::*, executor::*, DatabaseConnection, Statement};
|
||||
|
||||
use super::sqlx_common::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SqlxMySqlConnector;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SqlxMySqlPoolConnection {
|
||||
pool: MySqlPool,
|
||||
}
|
||||
|
@ -10,8 +10,10 @@ use crate::{debug_print, error::*, executor::*, DatabaseConnection, Statement};
|
||||
|
||||
use super::sqlx_common::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SqlxPostgresConnector;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SqlxPostgresPoolConnection {
|
||||
pool: PgPool,
|
||||
}
|
||||
|
@ -10,8 +10,10 @@ use crate::{debug_print, error::*, executor::*, DatabaseConnection, Statement};
|
||||
|
||||
use super::sqlx_common::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SqlxSqliteConnector;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SqlxSqlitePoolConnection {
|
||||
pool: SqlitePool,
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ pub trait Linked {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RelationDef {
|
||||
pub rel_type: RelationType,
|
||||
pub from_tbl: TableRef,
|
||||
@ -57,6 +58,7 @@ pub struct RelationDef {
|
||||
pub on_update: Option<ForeignKeyAction>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RelationBuilder<E, R>
|
||||
where
|
||||
E: EntityTrait,
|
||||
|
@ -21,6 +21,7 @@ pub trait TryGetable: Sized {
|
||||
fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>;
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum TryGetError {
|
||||
DbErr(DbErr),
|
||||
Null,
|
||||
|
@ -30,6 +30,7 @@ pub trait SelectorTrait {
|
||||
fn from_raw_query_result(res: QueryResult) -> Result<Self::Item, DbErr>;
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SelectModel<M>
|
||||
where
|
||||
M: FromQueryResult,
|
||||
|
@ -1,3 +1,10 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![deny(
|
||||
missing_debug_implementations,
|
||||
clippy::print_stderr,
|
||||
clippy::print_stdout
|
||||
)]
|
||||
|
||||
//! <div align="center">
|
||||
//!
|
||||
//! <img src="https://www.sea-ql.org/SeaORM/img/SeaORM banner.png"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user