Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ErrInvalidDB (0.36 sec)

  1. tests/prepared_stmt_test.go

    	var tmp User
    	err = tx.Session(&gorm.Session{}).First(&tmp, user.ID).Error
    	if err != gorm.ErrInvalidDB {
    		t.Fatalf("must got a gorm.ErrInvalidDB while execution after db close, got %+v instead", err)
    	}
    
    	// must be error
    	if lastErr != gorm.ErrInvalidDB && !isUsingClosedConnError(lastErr) {
    		t.Fatalf("exp error gorm.ErrInvalidDB, got %+v instead", lastErr)
    	}
    	if lastRunIndex >= loopCount || lastRunIndex < closeStartIdx {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:02:05 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. errors.go

    	// ErrEmptySlice empty slice found
    	ErrEmptySlice = errors.New("empty slice found")
    	// ErrDryRunModeUnsupported dry run mode unsupported
    	ErrDryRunModeUnsupported = errors.New("dry run mode unsupported")
    	// ErrInvalidDB invalid db
    	ErrInvalidDB = errors.New("invalid db")
    	// ErrInvalidValue invalid value
    	ErrInvalidValue = errors.New("invalid value, should be pointer to struct or slice")
    	// ErrInvalidValueOfLength invalid values do not match length
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Apr 26 02:53:17 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. prepare_stmt.go

    	if sqldb, ok := db.ConnPool.(*sql.DB); ok {
    		return sqldb, nil
    	}
    
    	if dbConnector, ok := db.ConnPool.(GetDBConnector); ok && dbConnector != nil {
    		return dbConnector.GetDBConn()
    	}
    
    	return nil, ErrInvalidDB
    }
    
    func (db *PreparedStmtDB) Close() {
    	db.Mux.Lock()
    	defer db.Mux.Unlock()
    
    	for _, stmt := range db.Stmts {
    		go func(s *Stmt) {
    			// make sure the stmt must finish preparation first
    			<-s.prepared
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:02:05 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. gorm.go

    		if sqldb, err := dbConnector.GetDBConn(); sqldb != nil || err != nil {
    			return sqldb, err
    		}
    	}
    
    	if sqldb, ok := connPool.(*sql.DB); ok && sqldb != nil {
    		return sqldb, nil
    	}
    
    	return nil, ErrInvalidDB
    }
    
    func (db *DB) getInstance() *DB {
    	if db.clone > 0 {
    		tx := &DB{Config: db.Config, Error: db.Error}
    
    		if db.clone == 1 {
    			// clone with new statement
    			tx.Statement = &Statement{
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Oct 09 11:29:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
Back to top