Get intent metadata for a provenance graph. Returns the intent entry when the graph carries a Goal node with intent `detail`, `None` otherwise.
(
&self,
provenance_hash: &Hash,
)
| 1827 | /// Returns the intent entry when the graph carries a Goal node with intent |
| 1828 | /// `detail`, `None` otherwise. |
| 1829 | pub fn get_session_intent( |
| 1830 | &self, |
| 1831 | provenance_hash: &Hash, |
| 1832 | ) -> Result<Option<atomic_core::change::session::IntentEntry>, RepositoryError> { |
| 1833 | let txn = self |
| 1834 | .pristine |
| 1835 | .read_txn() |
| 1836 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 1837 | let provenance_id = txn |
| 1838 | .get_internal(provenance_hash) |
| 1839 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 1840 | .ok_or_else(|| RepositoryError::ChangeNotFound { |
| 1841 | hash: provenance_hash.to_base32(), |
| 1842 | })?; |
| 1843 | txn.get_session_intent(provenance_id.get()) |
| 1844 | .map_err(|e| RepositoryError::Database(e.to_string())) |
| 1845 | } |
| 1846 | |
| 1847 | /// Check if a provenance graph has populated session data. |
| 1848 | /// |
nothing calls this directly
no test coverage detected