Close
Close 方法会关闭当前的语句句柄。
函数语法
func (s *Stmt) Close() error
示例
package main
import (
_ "./go-driver-xugusql"
"database/sql"
“log”
)
func main() {
db, _ := sql.Open("xugusql", "IP=192.168.78.130;DB=SYSTEM;User=SYSDBA;"
+ "PWD=SYSDBA;Port=5138;AUTO_COMMIT=on;CHAR_SET=UTF8")
stmt, err := db.Prepare(“insert into go_test values(?, ?);”)
if err != nil {
log.Fatal(err)
}
stmt.Close()
}