Attempt to DESCRIBE the given glob pattern using the provided reader.
(self, conn, reader: str, pattern: str)
| 112 | return self.available_columns |
| 113 | |
| 114 | def _try_describe(self, conn, reader: str, pattern: str): |
| 115 | """Attempt to DESCRIBE the given glob pattern using the provided reader.""" |
| 116 | escaped = str(self.datadir / pattern).replace("'", "''") |
| 117 | try: |
| 118 | query = f"DESCRIBE SELECT * FROM {reader}('{escaped}') LIMIT 0" |
| 119 | result = conn.execute(query).fetchall() |
| 120 | if result: |
| 121 | return result |
| 122 | except Exception: |
| 123 | return None |
| 124 | return None |
| 125 | |
| 126 | def get_schema_info(self) -> Dict[str, List[Tuple[str, str]]]: |
| 127 | """Return discovered schema information per CSV type.""" |
no test coverage detected