func (self *Connection) lastError(query []byte) error { if err := C.mysql_error(self.handle); *err != 0 { return &SqlError{Num: int(C.mysql_errno(self.handle)), Message: C.GoString(err), Query: string(query)} } return &SqlError{0, "Dummy", string(query)} }
// Returns the last error that occurred as an os.Error func (conn Connection) lastError() os.Error { if err := C.mysql_error(conn.handle); *err != 0 { return os.NewError(C.GoString(err)) } return nil; }