mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-18 14:35:14 +01:00
Use expect to get a better error message if accessing unavailable column
This commit is contained in:
@@ -789,7 +789,7 @@ impl Statement {
|
||||
}
|
||||
|
||||
pub fn get_column_name(&self, idx: usize) -> Cow<str> {
|
||||
let column = &self.program.result_columns[idx];
|
||||
let column = &self.program.result_columns.get(idx).expect("No column");
|
||||
match column.name(&self.program.table_references) {
|
||||
Some(name) => Cow::Borrowed(name),
|
||||
None => Cow::Owned(column.expr.to_string()),
|
||||
|
||||
Reference in New Issue
Block a user