Example #1
0
func (c *cubridConn) Close() error {
	var err gci.GCI_ERROR
	var err_no int
	err_no, err = gci.Disconnect(c.con)
	if err_no < 0 {
		return fmt.Errorf("error: %d, %s", err.Code, err.Msg)
	}
	return nil
}
Example #2
0
func (tx *cubridTx) Rollback() error {
	var conn_handle int
	conn_handle = tx.c.con
	var res int
	var err gci.GCI_ERROR

	res, err = gci.End_tran(conn_handle, gci.TRAN_ROLLBACK)
	if res < 0 {
		gci.Disconnect(conn_handle)
		return fmt.Errorf("commit error : %d", err.Code)
	}
	return nil
}