Fix example
This commit is contained in:
parent
041d28aa26
commit
5d84c88ccd
@ -7,7 +7,6 @@ publish = false
|
||||
[dependencies]
|
||||
async-std = { version = "^1.9", features = [ "attributes" ] }
|
||||
sea-orm = { path = "../../", features = [ "sqlx-mysql", "runtime-async-std-native-tls", "debug-print", "with-json", "macros" ], default-features = false }
|
||||
# sea-query = { path = "../../../sea-query" }
|
||||
strum = { version = "^0.20", features = [ "derive" ] }
|
||||
serde_json = { version = "^1" }
|
||||
futures = { version = "^0.3" }
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::{ExecErr, ExecResult, MockDatabaseConnection, QueryErr, QueryResult, Statement};
|
||||
use crate::{ExecErr, ExecResult, QueryErr, QueryResult, Statement};
|
||||
use sea_query::{
|
||||
DeleteStatement, InsertStatement, MysqlQueryBuilder, PostgresQueryBuilder,
|
||||
QueryStatementBuilder, SelectStatement, UpdateStatement,
|
||||
@ -92,9 +92,9 @@ impl DatabaseConnection {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_mock_connection(&self) -> &MockDatabaseConnection {
|
||||
#[cfg(feature = "mock")]
|
||||
pub fn as_mock_connection(&self) -> &crate::MockDatabaseConnection {
|
||||
match self {
|
||||
#[cfg(feature = "mock")]
|
||||
DatabaseConnection::MockDatabaseConnection(mock_conn) => mock_conn,
|
||||
_ => panic!("not mock connection"),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user