Conversation
|
I second this! Need to query a single cell, but I don't know its result type in advance. |
|
An acceptable alternative would be implementing FromSql for ColumnData that returns a clone of the ColumnData, but most of the implementation was already present for this, it was just a matter of separating it into its own function. |
|
Does the changes in #303 address this case? Granted, you will have to iterate to the column you want, but unless you have wide result sets or serious performance requirements, that might be acceptable? |
|
No, the borrow checker was not really the problem for me, it is much more straightforward for me to be able to get the data with the column name rather than iterating to the correct column, which is why I make this change in the first place. |
When working on data of an unknown type, it's very difficult to get a specific index without explicitly giving the type that we are going to receive. Being able to handle the
ColumnDatainstead of needing to provide a concrete type that implementsFromSqlallows this to be handled more conveniently.