Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for errorea (0.23 sec)

  1. scan.go

    			}
    		default:
    			db.AddError(rows.Scan(dest))
    		}
    	}
    
    	if err := rows.Err(); err != nil && err != db.Error {
    		db.AddError(err)
    	}
    
    	if db.RowsAffected == 0 && db.Statement.RaiseErrorOnNotFound && db.Error == nil {
    		db.AddError(ErrRecordNotFound)
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  2. migrator/migrator.go

    			}
    
    			return m.DB.Exec(createIndexSQL, values...).Error
    		}
    
    		return fmt.Errorf("failed to create index with name %s", name)
    	})
    }
    
    // DropIndex drop index `name`
    func (m Migrator) DropIndex(value interface{}, name string) error {
    	return m.RunWithValue(value, func(stmt *gorm.Statement) error {
    		if stmt.Schema != nil {
    			if idx := stmt.Schema.LookIndex(name); idx != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  3. tests/preload_test.go

    		t.Errorf("failed to query, got error %v, account: %#v", err, user4.Account)
    	}
    
    	if err := DB.Preload(clause.Associations, func(tx *gorm.DB) *gorm.DB {
    		return tx.Unscoped()
    	}).Take(&user4, "id = ?", users3[0].ID).Error; err != nil || user4.Account.ID == 0 {
    		t.Errorf("failed to query, got error %v, account: %#v", err, user4.Account)
    	}
    }
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  4. callbacks/preload.go

    				tx.Statement.Unscoped = db.Statement.Unscoped
    				if err := preload(tx, rel, append(preloads[name], associationsConds...), preloadMap[name]); err != nil {
    					return err
    				}
    			}
    		} else {
    			return fmt.Errorf("%s: %w for schema %s", name, gorm.ErrUnsupportedRelation, db.Statement.Schema.Name)
    		}
    	}
    	return nil
    }
    
    func preloadDB(db *gorm.DB, reflectValue reflect.Value, dest interface{}) *gorm.DB {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top