Commit d0170d0
committed
Return a single element while iterating over segments
This makes the usage of the segment cursor more natural:
```
cur = conn.cursor('segment')
cur.execute(sql)
spooled_result = cur.fetchall()
for spooled_data in spooled_result:
row_mapper = RowMapperFactory().create(columns=cur._query.columns, legacy_primitive_types=False)
rows = list(SegmentIterator(spooled_data, row_mapper))
```1 parent 3c745f7 commit d0170d0
File tree
3 files changed
+14
-7
lines changed- tests/integration
- trino
3 files changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1876 | 1876 | | |
1877 | 1877 | | |
1878 | 1878 | | |
1879 | | - | |
1880 | | - | |
1881 | | - | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
1882 | 1886 | | |
1883 | | - | |
1884 | | - | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
1885 | 1891 | | |
1886 | 1892 | | |
1887 | 1893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | | - | |
| 1190 | + | |
| 1191 | + | |
1191 | 1192 | | |
1192 | 1193 | | |
1193 | 1194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
745 | | - | |
| 745 | + | |
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
| |||
0 commit comments