sqlload 0.70.3

SQL data loading tooling.
1
2
3
4
5
6
7
8
9
10
11
12
//! The watched table the running task loads.

use crate::memory_budget::_helpers::watch::TABLE_WATCH;
use crate::memory_budget::models::WatchedTable;

/// The table the running task loads, with its run's guard; `None` outside a watched load.
pub fn table_memory() -> Option<WatchedTable> {
    let Ok(watched) = TABLE_WATCH.try_with(Clone::clone) else {
        return None;
    };
    Some(watched)
}