|
1 | 1 | # SQLite Driver TODO |
2 | 2 |
|
3 | | -## Missing Implementations |
4 | | - |
5 | | -- [ ] **Explain** (`db.go`) — Currently returns "not implemented"; useful for |
6 | | - Mango query debugging. |
7 | | -- [ ] **Missing options**: |
8 | | - - `att_encoding_info` (Get/Changes/Views) |
9 | | - - `batch` (Put) |
10 | | - - `heartbeat` (Changes) |
11 | | - - `execution_stats` (Find) |
12 | | - |
13 | 3 | ## Low Priority (polyfilled by kivik) |
14 | 4 |
|
15 | 5 | - [ ] **BulkDocs** (`db.go`) — kivik emulates via individual Put/CreateDoc. |
16 | 6 | - [ ] **Copy** (`db.go`) — kivik emulates via Get+Put. |
17 | 7 |
|
18 | 8 | ## Performance / Code Quality |
19 | 9 |
|
| 10 | +- [ ] **Find cross-type comparison correctness** (`find.go`) — |
| 11 | + `selectorToSQL` translates comparison operators (`$lt`, `$lte`, `$gt`, |
| 12 | + `$gte`, `$eq`) to SQL, but SQLite doesn't support CouchDB's cross-type |
| 13 | + ordering (null < bool < number < string < array < object). When |
| 14 | + `selectorComplete=true`, the in-memory filter is skipped, producing |
| 15 | + incorrect results for cross-type queries. |
| 16 | +- [ ] **`use_index` doesn't influence query execution** (`find.go`) — The hint |
| 17 | + is validated and triggers a warning if missing, but doesn't guide the |
| 18 | + query plan. |
20 | 19 | - [ ] **Reduce caching** (`README.md`) — Reduce functions run on-demand with no |
21 | 20 | intermediate result caching. |
22 | | -- [ ] **Mango SQL optimization** (`find.go`) — These selectors work via |
23 | | - in-memory fallback but aren't translated to SQL: `$not`, `$nor`, `$nin`, |
24 | | - `$regex`, `$mod`, `$all`, `$elemMatch`, `$type`, `$size`, `$allMatch`, |
25 | | - `$keyMapMatch`. |
| 21 | +- [ ] **Mango SQL optimization** (`find.go`) — These selectors could be |
| 22 | + translated to SQL for index support but aren't yet: `$size`, `$type`. |
| 23 | + The remaining operators (`$nin`, `$mod`, `$all`, `$elemMatch`, |
| 24 | + `$allMatch`, `$keyMapMatch`) aren't indexable in SQLite and are handled |
| 25 | + adequately by the in-memory fallback. |
26 | 26 | - [ ] **Filter in Go instead of SQL** (`query.go:569`) — Local and design |
27 | 27 | document filtering during view updates is done in Go after fetching rows, |
28 | 28 | rather than in the SQL query. |
0 commit comments