Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for Fatal (0.12 sec)

  1. tests/create_test.go

    	if ok {
    		t.Skipf("This test case skipped, because the db supports returning")
    	}
    
    	idVal, ok = mapValue1["id"].(int64)
    	if !ok {
    		t.Fatal("ret result missing id")
    	}
    
    	if int64(result1.ID) != idVal {
    		t.Fatal("failed to create data from map with table, @id != id")
    	}
    
    	// case2: one record, create from *map[string]interface{}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  2. tests/callbacks_test.go

    			results:   []string{"c5", "c1", "c2", "c3", "c4"},
    		},
    	}
    
    	for idx, data := range datas {
    		db, err := gorm.Open(nil, nil)
    		if err != nil {
    			t.Fatal(err)
    		}
    		callbacks := db.Callback()
    
    		for _, c := range data.callbacks {
    			var v interface{} = callbacks.Create()
    			callMethod := func(s interface{}, name string, args ...interface{}) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    		t.Fatalf("Failed to rename table, got error %v", err)
    	}
    
    	if !DB.Migrator().HasTable("new_table_structs") {
    		t.Fatal("should found renamed table")
    	}
    
    	DB.Migrator().DropTable("new_table_structs")
    
    	if DB.Migrator().HasTable(&NewTableStruct{}) {
    		t.Fatal("should not found dropped table")
    	}
    }
    
    func TestMigrateWithQuotedIndex(t *testing.T) {
    	if DB.Dialector.Name() != "mysql" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. tests/sql_builder_test.go

    	// after model changed
    	if DB.Statement.DryRun || DB.DryRun {
    		t.Fatal("Failed expect DB.DryRun and DB.Statement.ToSQL to be false")
    	}
    
    	if DB.Statement.SQL.String() != "" {
    		t.Fatal("Failed expect DB.Statement.SQL to be empty")
    	}
    
    	// first
    	sql = DB.ToSQL(func(tx *gorm.DB) *gorm.DB {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  5. tests/query_test.go

    func TestQueryScanToArray(t *testing.T) {
    	err := DB.Create(&User{Name: "testname1", Age: 10}).Error
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	users := [2]*User{{Name: "1"}, {Name: "2"}}
    	err = DB.Model(&User{}).Where("name = ?", "testname1").Find(&users).Error
    	if err != nil {
    		t.Fatal(err)
    	}
    	if users[0] == nil || users[0].Name != "testname1" {
    		t.Error("users[0] not covere")
    	}
    	if users[1] != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top