github.com/rjgonzale/pop/v5@v5.1.3-dev/db.go (about)

     1  package pop
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/jmoiron/sqlx"
     7  )
     8  
     9  type dB struct {
    10  	*sqlx.DB
    11  }
    12  
    13  func (db *dB) TransactionContext(ctx context.Context) (*Tx, error) {
    14  	return newTX(ctx, db)
    15  }
    16  
    17  func (db *dB) Transaction() (*Tx, error) {
    18  	return newTX(context.Background(), db)
    19  }
    20  
    21  func (db *dB) Rollback() error {
    22  	return nil
    23  }
    24  
    25  func (db *dB) Commit() error {
    26  	return nil
    27  }