func (db *Database) Commit() (*Database, error) {
	var err error
	if db.transaction != nil {
		err = db.transaction.Commit()
		db.transaction = nil
	} else {
		log.Errorf("there is an transaction to commit")
		err = fmt.Errorf("there is no transaction to commit")
	}
	return db, err
}
// Commit commits the existing transaction.
Commit commits the existing transaction.
// Commit commits the existing transaction .
func (db *Database) Commit() (*Database, error) {
	var err error
	if db.transaction != nil {
		err = db.transaction.Commit()
		db.transaction = nil
	} else {
		log.Errorf("there is an transaction to commit")
		err = fmt.Errorf("there is no transaction to commit")
	}
	return db, err
}
func ( db * Database ) Commit ( ) ( * Database , error ) { var err error if db . transaction != nil { err = db . transaction . Commit ( ) db . transaction = nil } else { log . Errorf ( " " ) err = fmt . Errorf ( " " ) } return db , err }
Commit commits the existing transaction.
Commit commits the existing transaction .