mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-07 04:59:37 +02:00
Improve comments and code readability
This commit is contained in:
parent
f6ad6db2f7
commit
3de158e5a5
19 changed files with 84 additions and 43 deletions
|
@ -2,14 +2,17 @@ package database
|
|||
|
||||
import "database/sql"
|
||||
|
||||
// dbtransaction is a struct to represent an SQL transaction, it implements the DBTransaction interface
|
||||
type dbtransaction struct {
|
||||
c *sql.Tx
|
||||
}
|
||||
|
||||
func (tx *dbtransaction) Commit() error {
|
||||
// Commit the SQL transaction
|
||||
return tx.c.Commit()
|
||||
}
|
||||
|
||||
func (tx *dbtransaction) Rollback() error {
|
||||
// Rollback the SQL transaction
|
||||
return tx.c.Rollback()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue