Commit 3ec71ef
authored
refactor(schema-api): extract TableApi and IndexApi traits (#18652)
Extract table and index operations from SchemaApi into separate
traits to improve modularity and separation of concerns. This
change organizes the codebase into focused, specialized traits
for better maintainability and clearer API boundaries.
Key changes:
- Create TableApi trait in src/meta/api/src/table_api.rs with all
table lifecycle operations (create, drop, rename, truncate, etc.)
- Create IndexApi trait in src/meta/api/src/index_api.rs with all
index management operations (create, drop, list, gc operations)
- Move corresponding implementations from schema_api.rs to the new
trait files while preserving all existing functionality
- Update imports across the codebase to use the new traits
- Add required type parameters for generic method calls where the
Rust compiler cannot infer types automatically
- Make internal utility functions public where needed by the new
trait implementations
This refactoring maintains full API compatibility while creating
a cleaner, more organized code structure that will facilitate
future development and testing.1 parent 0826e0f commit 3ec71ef
File tree
9 files changed
+2195
-1999
lines changed- src
- meta
- api/src
- binaries/metabench
- service/tests/it/grpc
- query/service/src
- catalogs/default
- databases/default
9 files changed
+2195
-1999
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
0 commit comments