Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for BeginTx (0.2 sec)

  1. tests/connpool_test.go

    	return c.db.Ping()
    }
    
    // If you use BeginTx returned *sql.Tx as shown below then you can't record queries in a transaction.
    //
    //	func (c *wrapperConnPool) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) {
    //		 return c.db.BeginTx(ctx, opts)
    //	}
    //
    // You should use BeginTx returned gorm.Tx which could wrap *sql.Tx then you can record all queries.
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  2. interfaces.go

    	SavePoint(tx *DB, name string) error
    	RollbackTo(tx *DB, name string) error
    }
    
    // TxBeginner tx beginner
    type TxBeginner interface {
    	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
    }
    
    // ConnPoolBeginner conn pool beginner
    type ConnPoolBeginner interface {
    	BeginTx(ctx context.Context, opts *sql.TxOptions) (ConnPool, error)
    }
    
    // TxCommitter tx committer
    type TxCommitter interface {
    	Commit() error
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Aug 19 13:33:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  3. prepare_stmt.go

    	db.PreparedSQL = append(db.PreparedSQL, query)
    	db.Mux.Unlock()
    
    	return cacheStmt, nil
    }
    
    func (db *PreparedStmtDB) BeginTx(ctx context.Context, opt *sql.TxOptions) (ConnPool, error) {
    	if beginner, ok := db.ConnPool.(TxBeginner); ok {
    		tx, err := beginner.BeginTx(ctx, opt)
    		return &PreparedStmtTX{PreparedStmtDB: db, Tx: tx}, err
    	}
    
    	beginner, ok := db.ConnPool.(ConnPoolBeginner)
    	if !ok {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. api/go1.8.txt

    pkg database/sql, const LevelWriteCommitted = 3
    pkg database/sql, const LevelWriteCommitted IsolationLevel
    pkg database/sql/driver, type ConnBeginTx interface { BeginTx }
    pkg database/sql/driver, type ConnBeginTx interface, BeginTx(context.Context, TxOptions) (Tx, error)
    pkg database/sql/driver, type ConnPrepareContext interface { PrepareContext }
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Dec 21 05:25:57 GMT 2016
    - 16.3K bytes
    - Viewed (0)
  5. finisher_api.go

    	if len(opts) > 0 {
    		opt = opts[0]
    	}
    
    	switch beginner := tx.Statement.ConnPool.(type) {
    	case TxBeginner:
    		tx.Statement.ConnPool, err = beginner.BeginTx(tx.Statement.Context, opt)
    	case ConnPoolBeginner:
    		tx.Statement.ConnPool, err = beginner.BeginTx(tx.Statement.Context, opt)
    	default:
    		err = ErrInvalidTransaction
    	}
    
    	if err != nil {
    		tx.AddError(err)
    	}
    
    	return tx
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  6. api/go1.9.txt

    pkg crypto, const BLAKE2b_512 Hash
    pkg crypto, const BLAKE2s_256 = 16
    pkg crypto, const BLAKE2s_256 Hash
    pkg crypto/x509, type Certificate struct, ExcludedDNSDomains []string
    pkg database/sql, method (*Conn) BeginTx(context.Context, *TxOptions) (*Tx, error)
    pkg database/sql, method (*Conn) Close() error
    pkg database/sql, method (*Conn) ExecContext(context.Context, string, ...interface{}) (Result, error)
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Oct 04 20:20:20 GMT 2021
    - 10.7K bytes
    - Viewed (0)
Back to top