Skip to main content

uqa_engine/capabilities/
comments.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7//! Retain description generations in the owning catalog transaction.
8
9use crate::Engine;
10use uqa_execution::catalog::comments::{CommentPublication, CommentRegistry};
11
12impl CommentPublication for Engine {
13    fn comments(&self) -> Box<dyn std::ops::Deref<Target = CommentRegistry> + '_> {
14        Box::new(self.durable.comments.read())
15    }
16    fn comment_catalog(&self) -> Option<&dyn uqa_storage::CatalogFacade> {
17        self.storage.catalog.as_deref()
18    }
19    fn publish_comments(&self, registry: CommentRegistry) {
20        *self.durable.comments.write() = registry;
21    }
22}