Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Committer (0.52 sec)

  1. finisher_api.go

    func (db *DB) Commit() *DB {
    	if committer, ok := db.Statement.ConnPool.(TxCommitter); ok && committer != nil && !reflect.ValueOf(committer).IsNil() {
    		db.AddError(committer.Commit())
    	} else {
    		db.AddError(ErrInvalidTransaction)
    	}
    	return db
    }
    
    // Rollback rollbacks the changes in a transaction
    func (db *DB) Rollback() *DB {
    	if committer, ok := db.Statement.ConnPool.(TxCommitter); ok && committer != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  2. interfaces.go

    }
    
    // ConnPoolBeginner conn pool beginner
    type ConnPoolBeginner interface {
    	BeginTx(ctx context.Context, opts *sql.TxOptions) (ConnPool, error)
    }
    
    // TxCommitter tx committer
    type TxCommitter interface {
    	Commit() error
    	Rollback() error
    }
    
    // Tx sql.Tx interface
    type Tx interface {
    	ConnPool
    	TxCommitter
    	StmtContext(ctx context.Context, stmt *sql.Stmt) *sql.Stmt
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Aug 19 13:33:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  3. internal/event/target/kafka.go

    func (target *KafkaTarget) SendFromStore(key store.Key) error {
    	if err := target.init(); err != nil {
    		return err
    	}
    
    	// If batch is enabled, the event will be batched in memory
    	// and will be committed once the batch is full.
    	if target.batch != nil {
    		return target.addToBatch(key)
    	}
    
    	eventData, eErr := target.store.Get(key.Name)
    	if eErr != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 20 08:16:35 GMT 2024
    - 13K bytes
    - Viewed (0)
  4. cmd/erasure-server-pool.go

    		//
    		// This happens repeatedly for all objects that are created concurrently() avoiding this
    		// as a List() call is an important performance improvement.
    		//
    		// Spark based s3a committers are a  big enough use-case to have this optimization.
    		//
    		// A sample code to see the improvements is as follows, this sample code is
    		// simply a read on JSON from MinIO and write it back as "parquet".
    		//
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  5. tests/connpool_test.go

    		t.Fatalf("Should find saved record, but got %v", err)
    	}
    
    	tx2.Commit()
    
    	if err = db.First(&User{}, "name = ?", "transaction-2").Error; err != nil {
    		t.Fatalf("Should be able to find committed record, but got %v", err)
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. tests/transaction_test.go

    		t.Fatalf("Should find saved record, but got %v", err)
    	}
    
    	tx2.Commit()
    
    	if err := DB.First(&User{}, "name = ?", "transaction-2").Error; err != nil {
    		t.Fatalf("Should be able to find committed record, but got %v", err)
    	}
    
    	t.Run("this is test nested transaction and prepareStmt coexist case", func(t *testing.T) {
    		// enable prepare statement
    		tx3 := DB.Session(&gorm.Session{PrepareStmt: true})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  7. src/archive/tar/reader.go

    	if err != nil || numEntries < 0 || int(2*numEntries) < int(numEntries) {
    		return nil, ErrHeader
    	}
    
    	// Parse for all member entries.
    	// numEntries is trusted after this since a potential attacker must have
    	// committed resources proportional to what this library used.
    	if err := feedTokens(2 * numEntries); err != nil {
    		return nil, err
    	}
    	spd := make(sparseDatas, 0, numEntries)
    	for i := int64(0); i < numEntries; i++ {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top