|
|
|
@ -106,7 +106,11 @@ impl MigrationSource<'static> for MigrationList {
|
|
|
|
|
|
|
|
|
|
/// Allows blocking on async code without creating a nested runtime.
|
|
|
|
|
fn run_async_command<F: std::future::Future>(cmd: F) -> F::Output {
|
|
|
|
|
tokio::task::block_in_place(|| tokio::runtime::Handle::current().block_on(cmd))
|
|
|
|
|
if tokio::runtime::Handle::try_current().is_ok() {
|
|
|
|
|
tokio::task::block_in_place(|| tokio::runtime::Handle::current().block_on(cmd))
|
|
|
|
|
} else {
|
|
|
|
|
tauri::async_runtime::block_on(cmd)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Tauri SQL plugin builder.
|
|
|
|
|