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 ring_buffer;
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> CatalogQueryTransaction for QT {}
54
55impl<
56	CT: CommandTransaction
57		+ MaterializedCatalogTransaction
58		+ CatalogTrackChangeOperations
59		+ WithInterceptors<CT>
60		+ TransactionalChanges,
61> CatalogCommandTransaction for CT
62{
63}
64
65pub use dictionary::{
66	CatalogDictionaryCommandOperations, CatalogDictionaryQueryOperations, CatalogTrackDictionaryChangeOperations,
67};
68pub use flow::{CatalogFlowQueryOperations, CatalogTrackFlowChangeOperations};
69pub use namespace::{
70	CatalogNamespaceCommandOperations, CatalogNamespaceQueryOperations, CatalogTrackNamespaceChangeOperations,
71};
72pub use ring_buffer::{
73	CatalogRingBufferCommandOperations, CatalogRingBufferQueryOperations, CatalogTrackRingBufferChangeOperations,
74};
75pub use source::CatalogSourceQueryOperations;
76pub use table::{CatalogTableCommandOperations, CatalogTableQueryOperations, CatalogTrackTableChangeOperations};
77pub use table_virtual_user::CatalogTableVirtualUserQueryOperations;
78pub use view::{CatalogTrackViewChangeOperations, CatalogViewCommandOperations, CatalogViewQueryOperations};
79
80use crate::MaterializedCatalog;