upgrade repl

This commit is contained in:
dignifiedquire
2020-03-21 14:24:41 +01:00
parent 18c1787552
commit 1846f20f6e
17 changed files with 352 additions and 418 deletions

View File

@@ -136,10 +136,22 @@ impl Context {
l.run(self.clone());
}
pub async fn is_running(&self) -> bool {
self.inner.scheduler.read().await.is_running()
}
pub async fn stop(&self) {
self.inner.stop().await;
}
/// Returns a reference to the underlying SQL instance.
///
/// Warning: this is only here for testing, not part of the public API.
#[cfg(feature = "internals")]
pub fn sql(&self) -> &Sql {
&self.inner.sql
}
/// Returns database file path.
pub fn get_dbfile(&self) -> &Path {
self.dbfile.as_path()