Commit 0206060
committed
feat(enhance): add pluck/raw/expand statement modes
Add better-sqlite3-compatible statement modes to enhance():
- pluck(): return first column value only
- raw(): return rows as arrays
- expand(): return rows namespaced by table
- stmt.database: back-reference to parent db
Modes are mutually exclusive, matching better-sqlite3 toggle semantics.
Expand mode uses arrays internally to handle duplicate column names.1 parent 49e39ec commit 0206060
5 files changed
Lines changed: 1203 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
5 | 17 | | |
6 | 18 | | |
7 | 19 | | |
| |||
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
| |||
0 commit comments