Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Seguin (0.3 sec)

  1. tests/prepared_stmt_test.go

    		t.Fatalf("no error should happen but got %v", err)
    	}
    }
    
    func TestPreparedStmtFromTransaction(t *testing.T) {
    	db := DB.Session(&gorm.Session{PrepareStmt: true, SkipDefaultTransaction: true})
    
    	tx := db.Begin()
    	defer func() {
    		if r := recover(); r != nil {
    			tx.Rollback()
    		}
    	}()
    	if err := tx.Error; err != nil {
    		t.Errorf("Failed to start transaction, got error %v\n", err)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 07:55:43 GMT 2024
    - 4K bytes
    - Viewed (0)
  2. prepare_stmt.go

    	db.Mux.Unlock()
    
    	// prepare completed
    	defer close(cacheStmt.prepared)
    
    	// Reason why cannot lock conn.PrepareContext
    	// suppose the maxopen is 1, g1 is creating record and g2 is querying record.
    	// 1. g1 begin tx, g1 is requeue because of waiting for the system call, now `db.ConnPool` db.numOpen == 1.
    	// 2. g2 select lock `conn.PrepareContext(ctx, query)`, now db.numOpen == db.maxOpen , wait for release.
    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)
  3. tests/connpool_test.go

    		}
    	}()
    
    	db, err := gorm.Open(mysql.New(mysql.Config{Conn: conn, DisableWithReturning: true}))
    	if err != nil {
    		t.Fatalf("Should open db success, but got %v", err)
    	}
    
    	tx := db.Begin()
    	user := *GetUser("transaction", Config{})
    
    	if err = tx.Save(&user).Error; err != nil {
    		t.Fatalf("No error should raise, but got %v", err)
    	}
    
    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)
  4. callbacks/callbacks.go

    	}
    	if len(config.UpdateClauses) == 0 {
    		config.UpdateClauses = updateClauses
    	}
    
    	createCallback := db.Callback().Create()
    	createCallback.Match(enableTransaction).Register("gorm:begin_transaction", BeginTransaction)
    	createCallback.Register("gorm:before_create", BeforeCreate)
    	createCallback.Register("gorm:save_before_associations", SaveBeforeAssociations(true))
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Oct 27 23:56:55 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  5. internal/event/target/kafka_scram_client_contrib.go

    	*scram.Client
    	*scram.ClientConversation
    	scram.HashGeneratorFcn
    }
    
    // Begin constructs a SCRAM client component based on a given hash.Hash
    // factory receiver.  This constructor will normalize the username, password
    // and authzID via the SASLprep algorithm, as recommended by RFC-5802.  If
    // SASLprep fails, the method returns an error.
    func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Nov 09 04:04:01 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  6. logger/logger.go

    	}
    }
    
    // Trace print sql message
    //
    //nolint:cyclop
    func (l *logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) {
    	if l.LogLevel <= Silent {
    		return
    	}
    
    	elapsed := time.Since(begin)
    	switch {
    	case err != nil && l.LogLevel >= Error && (!errors.Is(err, ErrRecordNotFound) || !l.IgnoreRecordNotFoundError):
    		sql, rows := fc()
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  7. internal/logger/target/kafka/kafka_scram_client_contrib.go

    	*scram.Client
    	*scram.ClientConversation
    	scram.HashGeneratorFcn
    }
    
    // Begin constructs a SCRAM client component based on a given hash.Hash
    // factory receiver.  This constructor will normalize the username, password
    // and authzID via the SASLprep algorithm, as recommended by RFC-5802.  If
    // SASLprep fails, the method returns an error.
    func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Nov 09 04:04:01 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  8. callbacks/transaction.go

    package callbacks
    
    import (
    	"gorm.io/gorm"
    )
    
    func BeginTransaction(db *gorm.DB) {
    	if !db.Config.SkipDefaultTransaction && db.Error == nil {
    		if tx := db.Begin(); tx.Error == nil {
    			db.Statement.ConnPool = tx.Statement.ConnPool
    			db.InstanceSet("gorm:started_transaction", true)
    		} else if tx.Error == gorm.ErrInvalidTransaction {
    			tx.Error = nil
    		} else {
    			db.Error = tx.Error
    		}
    	}
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Nov 29 01:33:20 GMT 2021
    - 675 bytes
    - Viewed (0)
  9. tests/tracer_test.go

    }
    
    func (S Tracer) Error(ctx context.Context, s string, i ...interface{}) {
    	S.Logger.Error(ctx, s, i...)
    }
    
    func (S Tracer) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {
    	S.Logger.Trace(ctx, begin, fc, err)
    	S.Test(ctx, begin, fc, err)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 18 09:28:06 GMT 2022
    - 830 bytes
    - Viewed (0)
  10. src/cmd/cgo/godefs.go

    	// Any names still using the _C syntax are not going to compile,
    	// although in general we don't know whether they all made it
    	// into the file, so we can't warn here.
    	//
    	// The most common case is union types, which begin with
    	// _Ctype_union and for which typedef[name] is a Go byte
    	// array of the appropriate size (such as [4]byte).
    	// Substitute those union types with byte arrays.
    	for name, id := range goIdent {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
Back to top