Check if a provenance graph has populated session data. Returns `true` when the graph has at least one indexed session event (every provenance node produces one, for any agent). This is a fast gate for the UI. Note it is intentionally broader than [`Self::get_session_intent`]: a generic agent graph whose Goal node carries no intent `detail` still has session data (events, todos).
(&self, provenance_hash: &Hash)
| 1852 | /// [`Self::get_session_intent`]: a generic agent graph whose Goal node |
| 1853 | /// carries no intent `detail` still has session data (events, todos). |
| 1854 | pub fn has_session_data(&self, provenance_hash: &Hash) -> bool { |
| 1855 | let txn = match self.pristine.read_txn() { |
| 1856 | Ok(t) => t, |
| 1857 | Err(_) => return false, |
| 1858 | }; |
| 1859 | |
| 1860 | let provenance_id = match txn.get_internal(provenance_hash) { |
| 1861 | Ok(Some(id)) => id.get(), |
| 1862 | _ => return false, |
| 1863 | }; |
| 1864 | |
| 1865 | txn.get_session_events(provenance_id) |
| 1866 | .map(|events| !events.is_empty()) |
| 1867 | .unwrap_or(false) |
| 1868 | } |
| 1869 | } |
| 1870 | |
| 1871 | #[cfg(unix)] |
nothing calls this directly
no test coverage detected