ID returns the transaction id.
()
| 66 | |
| 67 | // ID returns the transaction id. |
| 68 | func (tx *Tx) ID() int { |
| 69 | if tx == nil || tx.meta == nil { |
| 70 | return -1 |
| 71 | } |
| 72 | return int(tx.meta.Txid()) |
| 73 | } |
| 74 | |
| 75 | // DB returns a reference to the database that created the transaction. |
| 76 | func (tx *Tx) DB() *DB { |