reifydb-catalog 0.4.13

Database catalog and metadata management for ReifyDB
Documentation
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2025 ReifyDB

use std::sync::Arc;

use reifydb_core::interface::catalog::{id::NamespaceId, vtable::VTable};
use reifydb_transaction::transaction::Transaction;

use crate::catalog::Catalog;

impl Catalog {
	/// Find a user-defined virtual table by name.
	/// VTables are not transactionally modified, so this just delegates to the materialized catalog.
	pub fn find_vtable_user_by_name(
		&self,
		_txn: &mut Transaction<'_>,
		namespace: NamespaceId,
		name: &str,
	) -> Option<Arc<VTable>> {
		self.materialized.find_vtable_user_by_name(namespace, name)
	}

	/// List all user-defined virtual tables.
	/// VTables are not transactionally modified, so this just delegates to the materialized catalog.
	pub fn list_user_vtables(&self) -> Vec<Arc<VTable>> {
		self.materialized.list_vtable_user_all()
	}
}