1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2025 ReifyDB
use Arc;
use VTable;
use VTable;
/// Factory for creating virtual table instances.
///
/// Implementations must be thread-safe and create fresh instances on each call.
/// The factory pattern allows virtual tables to be registered once and instantiated
/// on-demand for each query execution.
///
/// # Example
///
/// ```ignore
/// struct MyTableFactory {
/// definition: Arc<VTable>,
/// }
///
/// impl VirtualTableFactory for MyTableFactory {
/// fn create_boxed(&self) -> Box<dyn BaseVTable + Send + Sync> {
/// Box::new(MyVirtualTable::new(self.vtable.clone()))
/// }
///
/// fn definition(&self) -> Arc<VTable> {
/// self.vtable.clone()
/// }
/// }
/// ```