reifydb_catalog/transaction/
mod.rs

1// Copyright (c) reifydb.com 2025
2// This file is licensed under the AGPL-3.0-or-later, see license.md file
3
4use reifydb_core::interface::{
5	CommandTransaction, QueryTransaction, TransactionalChanges, interceptor::WithInterceptors,
6};
7
8mod dictionary;
9mod flow;
10mod namespace;
11mod ringbuffer;
12mod source;
13mod table;
14mod table_virtual_user;
15mod view;
16
17pub trait MaterializedCatalogTransaction {
18	fn catalog(&self) -> &MaterializedCatalog;
19}
20
21pub trait CatalogCommandTransaction:
22	CatalogQueryTransaction
23	+ CatalogDictionaryCommandOperations
24	+ CatalogNamespaceCommandOperations
25	+ CatalogRingBufferCommandOperations
26	+ CatalogTableCommandOperations
27	+ CatalogViewCommandOperations
28{
29}
30
31pub trait CatalogTrackChangeOperations:
32	CatalogTrackDictionaryChangeOperations
33	+ CatalogTrackFlowChangeOperations
34	+ CatalogTrackNamespaceChangeOperations
35	+ CatalogTrackRingBufferChangeOperations
36	+ CatalogTrackTableChangeOperations
37	+ CatalogTrackViewChangeOperations
38{
39}
40
41pub trait CatalogQueryTransaction:
42	CatalogDictionaryQueryOperations
43	+ CatalogFlowQueryOperations
44	+ CatalogNamespaceQueryOperations
45	+ CatalogRingBufferQueryOperations
46	+ CatalogSourceQueryOperations
47	+ CatalogTableQueryOperations
48	+ CatalogTableVirtualUserQueryOperations
49	+ CatalogViewQueryOperations
50{
51}
52
53impl<QT: QueryTransaction + MaterializedCatalogTransaction + TransactionalChanges + 'static> CatalogQueryTransaction
54	for QT
55{
56}
57
58impl<
59	CT: CommandTransaction
60		+ MaterializedCatalogTransaction
61		+ CatalogTrackChangeOperations
62		+ WithInterceptors<CT>
63		+ TransactionalChanges
64		+ Send
65		+ 'static,
66> CatalogCommandTransaction for CT
67{
68}
69
70pub use dictionary::{
71	CatalogDictionaryCommandOperations, CatalogDictionaryQueryOperations, CatalogTrackDictionaryChangeOperations,
72};
73pub use flow::{CatalogFlowQueryOperations, CatalogTrackFlowChangeOperations};
74pub use namespace::{
75	CatalogNamespaceCommandOperations, CatalogNamespaceQueryOperations, CatalogTrackNamespaceChangeOperations,
76};
77pub use ringbuffer::{
78	CatalogRingBufferCommandOperations, CatalogRingBufferQueryOperations, CatalogTrackRingBufferChangeOperations,
79};
80pub use source::CatalogSourceQueryOperations;
81pub use table::{CatalogTableCommandOperations, CatalogTableQueryOperations, CatalogTrackTableChangeOperations};
82pub use table_virtual_user::CatalogTableVirtualUserQueryOperations;
83pub use view::{CatalogTrackViewChangeOperations, CatalogViewCommandOperations, CatalogViewQueryOperations};
84
85use crate::MaterializedCatalog;