You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the query* methods take a mutable reference to the Statement. When trying to call the column_count method, the borrow-checker complains:
cannot borrow `stmt` as immutable because it is also borrowed as mutable
Please note that the error is only triggered if the rows variable is actually used!
I would like to use the column count when 'deserializing' the rows. Any help/hints will be appreciated.
The text was updated successfully, but these errors were encountered:
gmosx
changed the title
How to use column_count method of Statement.
How to use the column_count method of Statement?
Aug 27, 2024
I am wondering, how is the
column_count
method supposed to be used.AFAICU, you have to prepare and execute (query) the Statement, before you can call this method:
The problem is that the
query*
methods take a mutable reference to the Statement. When trying to call thecolumn_count
method, the borrow-checker complains:Please note that the error is only triggered if the rows variable is actually used!
I would like to use the column count when 'deserializing' the rows. Any help/hints will be appreciated.
The text was updated successfully, but these errors were encountered: