type github.com/go-pg/pg/v10.Tx
49 uses
github.com/go-pg/pg/v10 (current package)
pg.go#L115: Begin() (*Tx, error)
pg.go#L116: RunInTransaction(ctx context.Context, fn func(*Tx) error) error
pg.go#L124: _ DBI = (*Tx)(nil)
tx.go#L29: type Tx struct {
tx.go#L39: var _ orm.DB = (*Tx)(nil)
tx.go#L42: func (tx *Tx) Context() context.Context {
tx.go#L47: func (db *baseDB) Begin() (*Tx, error) {
tx.go#L51: func (db *baseDB) BeginContext(ctx context.Context) (*Tx, error) {
tx.go#L52: tx := &Tx{
tx.go#L69: func (db *baseDB) RunInTransaction(ctx context.Context, fn func(*Tx) error) error {
tx.go#L78: func (tx *Tx) Begin() (*Tx, error) {
tx.go#L85: func (tx *Tx) RunInTransaction(ctx context.Context, fn func(*Tx) error) error {
tx.go#L104: func (tx *Tx) withConn(c context.Context, fn func(context.Context, *pool.Conn) error) error {
tx.go#L114: func (tx *Tx) Stmt(stmt *Stmt) *Stmt {
tx.go#L128: func (tx *Tx) Prepare(q string) (*Stmt, error) {
tx.go#L143: func (tx *Tx) Exec(query interface{}, params ...interface{}) (Result, error) {
tx.go#L148: func (tx *Tx) ExecContext(c context.Context, query interface{}, params ...interface{}) (Result, error) {
tx.go#L152: func (tx *Tx) exec(ctx context.Context, query interface{}, params ...interface{}) (Result, error) {
tx.go#L178: func (tx *Tx) ExecOne(query interface{}, params ...interface{}) (Result, error) {
tx.go#L183: func (tx *Tx) ExecOneContext(c context.Context, query interface{}, params ...interface{}) (Result, error) {
tx.go#L187: func (tx *Tx) execOne(c context.Context, query interface{}, params ...interface{}) (Result, error) {
tx.go#L200: func (tx *Tx) Query(model interface{}, query interface{}, params ...interface{}) (Result, error) {
tx.go#L205: func (tx *Tx) QueryContext(
tx.go#L214: func (tx *Tx) query(
tx.go#L245: func (tx *Tx) QueryOne(model interface{}, query interface{}, params ...interface{}) (Result, error) {
tx.go#L250: func (tx *Tx) QueryOneContext(
tx.go#L259: func (tx *Tx) queryOne(
tx.go#L282: func (tx *Tx) Model(model ...interface{}) *Query {
tx.go#L287: func (tx *Tx) ModelContext(c context.Context, model ...interface{}) *Query {
tx.go#L292: func (tx *Tx) CopyFrom(r io.Reader, query interface{}, params ...interface{}) (res Result, err error) {
tx.go#L301: func (tx *Tx) CopyTo(w io.Writer, query interface{}, params ...interface{}) (res Result, err error) {
tx.go#L310: func (tx *Tx) Formatter() orm.QueryFormatter {
tx.go#L314: func (tx *Tx) begin(ctx context.Context) error {
tx.go#L336: func (tx *Tx) Commit() error {
tx.go#L341: func (tx *Tx) CommitContext(ctx context.Context) error {
tx.go#L347: func (tx *Tx) Rollback() error {
tx.go#L352: func (tx *Tx) RollbackContext(ctx context.Context) error {
tx.go#L358: func (tx *Tx) Close() error {
tx.go#L363: func (tx *Tx) CloseContext(ctx context.Context) error {
tx.go#L370: func (tx *Tx) close() {
tx.go#L386: func (tx *Tx) closed() bool {
github.com/go-pg/migrations/v8
collection.go#L549: func (c *Collection) runUp(db DB, tx *pg.Tx, m *Migration) (int64, error) {
collection.go#L562: func (c *Collection) runDown(db DB, tx *pg.Tx, m *Migration) (int64, error) {
collection.go#L578: tx *pg.Tx, fn func() (int64, error),
collection.go#L588: func (c *Collection) down(db DB, tx *pg.Tx, migrations []*Migration, oldVersion int64) (int64, error) {
collection.go#L674: func (c *Collection) begin(db DB) (*pg.Tx, int64, error) {
migrations.go#L20: Begin() (*pg.Tx, error)