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
{{ message }}
This repository has been archived by the owner on May 10, 2020. It is now read-only.
It's currently not possible to use simple_exec to execute multiple ;-separated statements. The following code fails with "ExecResult received more than 1 resultset":
Yeah you can do something like simple_exec(...).into_stream().and_then(|f| f).collect() to handle multiple resultsets.
The original intent of this is that you do not unintentionally execute multiple statements and handle the wrong resultset.
Alternatively simple_exec/exec could take the first result and silently ignore others, but I'm not sure that behavior is desirable, since you won't easily find when something unintentionally goes wrong (e.g. a statement returns a empty result first, which you handle and then the results you wanted to handle and now you assume that they do not exist).
So I think this is still the best approach, but maybe currently not documented enough.
Yeah, those are good points. Documentation would help, so would modifying the error message to point you to the fact that only a single statement can be executed at a time.
It's currently not possible to use
simple_exec
to execute multiple;
-separated statements. The following code fails with "ExecResult received more than 1 resultset":The text was updated successfully, but these errors were encountered: