Commit d81af9b
fix: fetch('column') returns array instead of list of dicts
In DJ 1.x, fetch('column') returns an array like ['alpha', 'beta'].
The previous implementation incorrectly returned list of dicts when
as_dict was not specified.
Fix: Change condition from `if as_dict or as_dict is None` to
`if as_dict is True` so unspecified as_dict defaults to array output.
Before (broken):
names = Table().fetch("name") # [{'name': 'alpha'}, {'name': 'beta'}]
"alpha" in names # False
After (matches DJ 1.x):
names = Table().fetch("name") # array(['alpha', 'beta'])
"alpha" in names # True
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 71b63db commit d81af9b
2 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
643 | | - | |
| 642 | + | |
| 643 | + | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
| 647 | + | |
647 | 648 | | |
648 | 649 | | |
649 | 650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
| |||
0 commit comments