Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 63 for Rollback (0.21 seconds)

  1. tests/transaction_test.go

    	}
    
    	if sqlTx, ok := tx.Statement.ConnPool.(gorm.TxCommitter); !ok || sqlTx == nil {
    		t.Fatalf("Should return the underlying sql.Tx")
    	}
    
    	tx.Rollback()
    
    	if err := DB.First(&User{}, "name = ?", "transaction").Error; err == nil {
    		t.Fatalf("Should not find record after rollback, but got %v", err)
    	}
    
    	txDB := DB.Where("fake_name = ?", "fake_name")
    	tx2 := txDB.Session(&gorm.Session{NewDB: true}).Begin()
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Mon Sep 08 09:19:22 GMT 2025
    - 13.3K bytes
    - Click Count (0)
  2. finisher_api.go

    	} 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 {
    		if !reflect.ValueOf(committer).IsNil() {
    			db.AddError(committer.Rollback())
    		}
    	} else {
    		db.AddError(ErrInvalidTransaction)
    	}
    	return db
    }
    
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Fri Sep 19 01:49:06 GMT 2025
    - 22.9K bytes
    - Click Count (0)
  3. tests/generics_test.go

    	}
    
    	if err := tx.Rollback().Error; err != nil {
    		t.Fatalf("failed to rollback transaction: %v", err)
    	}
    
    	count2, err := gorm.G[User](DB).Where("name like ?", "TestGenericsTransaction%").Count(ctx, "*")
    	if err != nil {
    		t.Fatalf("Count failed: %v", err)
    	}
    	if count2 != 0 {
    		t.Errorf("expected 0 records after rollback, got %d", count2)
    	}
    }
    
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Sun Nov 02 14:09:18 GMT 2025
    - 33.7K bytes
    - Click Count (0)
  4. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    Wenn beispielsweise ein Code irgendwann in der Mitte, in einer anderen Abhängigkeit oder in einer *Pfadoperation*, ein „Rollback“ einer Datenbanktransaktion macht oder eine andere Exception verursacht, empfangen Sie die Exception in Ihrer Abhängigkeit.
    
    Sie können also mit `except SomeException` diese bestimmte Exception innerhalb der Abhängigkeit handhaben.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 14.7K bytes
    - Click Count (0)
  5. docs/es/docs/tutorial/dependencies/dependencies-with-yield.md

    Por ejemplo, si algún código en algún punto intermedio, en otra dependencia o en una *path operation*, realiza un "rollback" en una transacción de base de datos o crea cualquier otro error, recibirás la excepción en tu dependencia.
    
    Por lo tanto, puedes buscar esa excepción específica dentro de la dependencia con `except SomeException`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 13.7K bytes
    - Click Count (0)
  6. cmd/update.go

    	if err = selfupdate.CommitBinary(opts); err != nil {
    		if rerr := selfupdate.RollbackError(err); rerr != nil {
    			return AdminError{
    				Code:       AdminUpdateApplyFailure,
    				Message:    fmt.Sprintf("Failed to rollback from bad update: %v", rerr),
    				StatusCode: http.StatusInternalServerError,
    			}
    		}
    		var pathErr *os.PathError
    		if errors.As(err, &pathErr) {
    			return AdminError{
    				Code: AdminUpdateApplyFailure,
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 18.9K bytes
    - Click Count (0)
  7. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    Por exemplo, se algum código em um certo momento no meio, em outra dependência ou em uma *operação de rota*, fizer um "rollback" de uma transação de banco de dados ou causar qualquer outra exceção, você irá capturar a exceção em sua dependência.
    
    Então, você pode procurar por essa exceção específica dentro da dependência com `except AlgumaExcecao`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 14.2K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    For example, if some code at some point in the middle, in another dependency or in a *path operation*, made a database transaction "rollback" or created any other exception, you would receive the exception in your dependency.
    
    So, you can look for that specific exception inside the dependency with `except SomeException`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 12.9K bytes
    - Click Count (0)
  9. cmd/erasure-multipart.go

    // doesn't require clients to initiate multiple such requests.
    //
    // All parts are purged from all disks and reference to the uploadID
    // would be removed from the system, rollback is not possible on this
    // operation.
    func (er erasureObjects) AbortMultipartUpload(ctx context.Context, bucket, object, uploadID string, opts ObjectOptions) (err error) {
    	if !opts.NoAuditLog {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Oct 24 04:05:31 GMT 2025
    - 47.1K bytes
    - Click Count (0)
  10. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/sources/KotlinSourceQueries.kt

                else -> when (ctMember) {
                    is CtField -> ktFile.getSince(ctDeclaringClass, ctMember, fallback = declaringClassSince)
                    is CtConstructor -> ktFile.getSince(ctDeclaringClass, ctMember, fallback = declaringClassSince)
                    is CtMethod -> ktFile.getSince(ctDeclaringClass, ctMember, fallback = declaringClassSince)
                    else -> error("Unsupported japicmp member type '${member::class}'")
                }
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Tue Jul 08 07:02:19 GMT 2025
    - 13.2K bytes
    - Click Count (0)
Back to Top