Commit 3c457a6
authored
Add ADBC DB-API engine for SQL connections (#7664)
Closes #7549.
### What
- Adds `AdbcDBAPIEngine` (`marimo/_sql/engines/adbc.py`) to support
Arrow ADBC **DB-API wrapper** connections as first-class SQL engines.
- Uses `cursor.fetch_arrow_table()` for Arrow-native result fetching and
converts via existing `convert_to_output`.
- Implements catalog discovery via `adbc_get_objects()` /
`adbc_get_table_schema()` and respects `include_schemas` /
`include_tables` / `include_table_details` via `depth` + filters.
- Adds dialect inference from `adbc_get_info()` (cached), attempting to
derive dialect from vendor name.
### Tests
- `hatch run lint`
- `hatch run format --check`
- `hatch run typecheck:check`
- `hatch run typos -w`
- `hatch run +py=3.12 test:test tests/_sql/test_adbc.py`
- `hatch run +py=3.12 test-optional:test tests/_sql/test_adbc.py`
### Notes
- Integration tests for the SQLite ADBC driver are gated behind
`pytest.importorskip` and run in `test-optional` (adds
`adbc_driver_manager` + `adbc_driver_sqlite` there).
---------
Co-authored-by: corleyma <2080732+corleyma@users.noreply.github.com>1 parent ea749af commit 3c457a6
File tree
14 files changed
+1472
-9
lines changed- frontend/src
- components
- databases
- datasources
- core/codemirror
- language/languages/sql
- marimo/_sql
- engines
- tests
- _plugins/ui/_impl
- _sql
14 files changed
+1472
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| 207 | + | |
206 | 208 | | |
| 209 | + | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
| |||
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
| 408 | + | |
| 409 | + | |
407 | 410 | | |
408 | 411 | | |
409 | 412 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| 116 | + | |
| 117 | + | |
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| |||
0 commit comments