Handles instructions to modify the catalog. Currently supported commands: `(defsource [types_of_cols] [[optional_sets_of_key_cols]])` - insert a source into the catalog.
(&mut self, spec: &str)
| 141 | /// * `(defsource [types_of_cols] [[optional_sets_of_key_cols]])` - |
| 142 | /// insert a source into the catalog. |
| 143 | pub fn handle_test_command(&mut self, spec: &str) -> Result<(), String> { |
| 144 | let mut stream_iter = tokenize(spec)?.into_iter(); |
| 145 | while let Some(command) = deserialize_optional_generic::<TestCatalogCommand, _>( |
| 146 | &mut stream_iter, |
| 147 | "TestCatalogCommand", |
| 148 | )? { |
| 149 | match command { |
| 150 | TestCatalogCommand::Defsource { name, typ } => { |
| 151 | self.insert(&name, typ, false)?; |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | Ok(()) |
| 156 | } |
| 157 | |
| 158 | /// Clears all transient objects from the catalog. |
| 159 | pub fn remove_transient_objects(&mut self) { |