sqlite
sqlite copied to clipboard
column names are not exposed in Cursor
Its a bit annoying to use the Cursor
interface while also accessing column names. Column names are exposed by the base Statement
but because it is consumed by into_cursor()
you cannot hold references to column_names()
across into_cursor()
.
Motivating example:
let s = conn.prepare("select * from dual")?;
let cols = s.column_names();
let c = s.into_cursor();
let err0505 = cols[1];
A simple solution would be to also expose column_names()
on the cursor directly.