(conn)
| 200 | |
| 201 | |
| 202 | def create_and_load_iris_view(conn): |
| 203 | stmt = "CREATE VIEW iris_view AS SELECT * FROM iris" |
| 204 | if isinstance(conn, sqlite3.Connection): |
| 205 | cur = conn.cursor() |
| 206 | cur.execute(stmt) |
| 207 | else: |
| 208 | adbc = import_optional_dependency("adbc_driver_manager.dbapi", errors="ignore") |
| 209 | if adbc and isinstance(conn, adbc.Connection): |
| 210 | with conn.cursor() as cur: |
| 211 | cur.execute(stmt) |
| 212 | conn.commit() |
| 213 | else: |
| 214 | from sqlalchemy import text |
| 215 | |
| 216 | stmt = text(stmt) |
| 217 | with conn.begin() as con: |
| 218 | con.execute(stmt) |
| 219 | |
| 220 | |
| 221 | def types_table_metadata(dialect: str): |
no test coverage detected