Commit commits a transaction
()
| 64 | |
| 65 | // Commit commits a transaction |
| 66 | func (d *DB) Commit() error { |
| 67 | if db, ok := d.Conn.(sqlTx); ok && db != nil { |
| 68 | return db.Commit() |
| 69 | } |
| 70 | |
| 71 | return errors.New("invalid transaction") |
| 72 | } |
| 73 | |
| 74 | // Rollback rolls back a transaction |
| 75 | func (d *DB) Rollback() error { |