(self, collection_name: str, replace: bool = False)
| 192 | connection.execute(statement) |
| 193 | |
| 194 | def set_collection(self, collection_name: str, replace: bool = False) -> None: |
| 195 | inspector = inspect(self.engine) |
| 196 | table_exists = collection_name in inspector.get_table_names() |
| 197 | |
| 198 | if ( |
| 199 | collection_name == self.config.collection_name |
| 200 | and table_exists |
| 201 | and not replace |
| 202 | ): |
| 203 | return |
| 204 | else: |
| 205 | self.config.collection_name = collection_name |
| 206 | self.config.replace_collection = replace |
| 207 | self._setup_table() |
| 208 | |
| 209 | def list_collections(self, empty: bool = True) -> List[str]: |
| 210 | inspector = inspect(self.engine) |
no test coverage detected