Closed AndreiTS closed 3 years ago
Table structure: https://pastebin.com/gcsEjvAs
What this error means?
You have too many columns. Like 101. At this moment, we only implement the FromRow
until 26
You can use the Row struct instead and iterate over your columns.
If you need a structured row, you can use the diesel
. We are still working on this implementation, but you can already use for tests.
You can use the Row struct instead and iterate over your columns.
Can you give me an example?
You can use the Row struct instead and iterate over your columns.
Can you give me an example?
Yes. Here.
let rows: Vec<Row> = conn.query("select test.*, 10 as extra from test", ())?;
for row in rows {
println!("------------------------------------");
for col in row.cols {
println!("{}: {:?}", col.name, col.value);
}
}
Thanks
What this error means?
I have a custom type holding a tuple with the type of each column from the table:
And I'm using it like this:
` let rows = conn.query_iter("SELECT * FROM C000007", ())?;
`