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
autorc is intended for long life processes that create some server side statements at start and use them for different data for whole life of process. There is conceptually problem with close a connection, or destroy statement because such operation can return an error (especially a network error).
autorc is intended to recover from errors by reconnect and recreate all previously created statements. But in this case (close connection, delete a statement) it shouldn't do this. So autorc.Conn.Close and autorc.Stmt.Delete will have inconsistent behavior with other functions. I didn't found any proper solution for this problem and it turned out that these functions aren't necessary in all my real applications. So they haven't be implemented but Raw field is there so you can call Delete and Close yourself and because it is special case you should handle all errors yourself and probably invalidate Conn/Stmt (by set Raw = nil) if you didn't plan to use it in feature (if you don't invalidate them, they probably can be recreated at second use).
this my code .
http://play.golang.org/p/3q18mG9mbJ
so , https://github.com/go-sql-driver/mysql/blob/master/statement.go have stmt.Close(). how to use it in mymysql?
The text was updated successfully, but these errors were encountered: