MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / new_mock

Method new_mock

src/driver/mock.rs:243–257  ·  view source on GitHub ↗
(
        inner: Arc<crate::MockDatabaseConnection>,
        metric_callback: Option<crate::metric::Callback>,
    )

Source from the content-addressed store, hash-verified

241
242impl crate::DatabaseTransaction {
243 pub(crate) async fn new_mock(
244 inner: Arc<crate::MockDatabaseConnection>,
245 metric_callback: Option<crate::metric::Callback>,
246 ) -> Result<crate::DatabaseTransaction, DbErr> {
247 use futures_util::lock::Mutex;
248 let backend = inner.get_database_backend();
249 Self::begin(
250 Arc::new(Mutex::new(crate::InnerConnection::Mock(inner))),
251 backend,
252 metric_callback,
253 None,
254 None,
255 )
256 .await
257 }
258}

Callers

nothing calls this directly

Calls 2

newFunction · 0.50
get_database_backendMethod · 0.45

Tested by

no test coverage detected