Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 82 for transaction (0.07 sec)

  1. tests/transaction_test.go

    		tx3 := DB.Session(&gorm.Session{PrepareStmt: true})
    		if err := tx3.Transaction(func(tx4 *gorm.DB) error {
    			// nested transaction
    			return tx4.Transaction(func(tx5 *gorm.DB) error {
    				return tx5.First(&User{}, "name = ?", "transaction-2").Error
    			})
    		}); err != nil {
    			t.Fatalf("prepare statement and nested transaction coexist" + err.Error())
    		}
    	})
    }
    
    func TestCancelTransaction(t *testing.T) {
    	ctx := context.Background()
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  2. tests/prepared_stmt_test.go

    	if err := tx.Error; err != nil {
    		t.Errorf("Failed to start transaction, got error %v\n", err)
    	}
    
    	if err := tx.Where("name=?", "zzjin").Delete(&User{}).Error; err != nil {
    		tx.Rollback()
    		t.Errorf("Failed to run one transaction, got error %v\n", err)
    	}
    
    	if err := tx.Create(&User{Name: "zzjin"}).Error; err != nil {
    		tx.Rollback()
    		t.Errorf("Failed to run one transaction, got error %v\n", err)
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:02:05 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. fess-crawler-opensearch/pom.xml

    			<groupId>org.lastaflute</groupId>
    			<artifactId>lasta-di</artifactId>
    			<version>${lasta.di.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>jakarta.transaction</groupId>
    			<artifactId>jakarta.transaction-api</artifactId>
    			<version>${jakarta.transaction.version}</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>junit</groupId>
    			<artifactId>junit</artifactId>
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Nov 07 04:44:10 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  4. prepare_stmt.go

    				_ = s.Close()
    			}
    		}(stmt)
    	}
    	sdb.Stmts = make(map[string]*Stmt)
    }
    
    func (db *PreparedStmtDB) prepare(ctx context.Context, conn ConnPool, isTransaction bool, query string) (Stmt, error) {
    	db.Mux.RLock()
    	if stmt, ok := db.Stmts[query]; ok && (!stmt.Transaction || isTransaction) {
    		db.Mux.RUnlock()
    		// wait for other goroutines prepared
    		<-stmt.prepared
    		if stmt.prepareErr != nil {
    			return Stmt{}, stmt.prepareErr
    		}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:02:05 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  5. finisher_api.go

    	defer conn.Close()
    	tx.Statement.ConnPool = conn
    	return fc(tx)
    }
    
    // Transaction start a transaction as a block, return error will rollback, otherwise to commit. Transaction executes an
    // arbitrary number of commands in fc within a transaction. On success the changes are committed; if an error occurs
    // they are rolled back.
    func (db *DB) Transaction(fc func(tx *DB) error, opts ...*sql.TxOptions) (err error) {
    	panicked := true
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *         .transformAsync((closer, transaction) -> transaction.queryClosingFuture("..."), executor)
     *         .transform((closer, result) -> result.get("userName"), directExecutor())
     *         .catching(DBException.class, e -> "no user", directExecutor())
     *         .finishToFuture();
     * }</pre>
     *
     * In this example, when the {@code userName} {@link Future} is done, the transaction and the query
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 08 19:36:35 UTC 2024
    - 98.5K bytes
    - Viewed (0)
  7. internal/event/target/kafka.go

    	close(target.quitCh)
    
    	if target.batch != nil {
    		target.batch.Close()
    	}
    
    	if target.producer != nil {
    		if target.store != nil {
    			// It is safe to abort the current transaction if
    			// queue_dir is configured
    			target.producer.AbortTxn()
    		} else {
    			target.producer.CommitTxn()
    		}
    		target.producer.Close()
    		return target.client.Close()
    	}
    
    	return nil
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. pom.xml

    			<!-- contains taglibs.standard -->
    			<version>${jakarta.jstl.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>jakarta.transaction</groupId>
    			<artifactId>jakarta.transaction-api</artifactId>
    			<version>${jakarta.transaction.api.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.glassfish.jersey.core</groupId>
    			<artifactId>jersey-common</artifactId>
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Sat Oct 26 02:16:03 UTC 2024
    - 49.1K bytes
    - Viewed (0)
  9. gorm.go

    	// DisableNestedTransaction disable nested transaction
    	DisableNestedTransaction bool
    	// AllowGlobalUpdate allow global update
    	AllowGlobalUpdate bool
    	// QueryFields executes the SQL query with all fields of the table
    	QueryFields bool
    	// CreateBatchSize default create batch size
    	CreateBatchSize int
    	// TranslateError enabling error translation
    	TranslateError bool
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Oct 09 11:29:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  10. cmd/xl-storage.go

    						continue
    					}
    
    					if err = Rename(pathJoin(currentDataPath, entry), pathJoin(legacyDataPath, entry)); err != nil {
    						// Any failed rename calls un-roll previous transaction.
    						s.deleteFile(dstVolumeDir, legacyDataPath, true, false)
    
    						return res, osErrToFileErr(err)
    					}
    				}
    			}
    		}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 91.3K bytes
    - Viewed (0)
Back to top