- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 76 for clear (0.14 sec)
-
association.go
appendToRelations(reflectValue.Index(i), reflect.Indirect(reflect.ValueOf(values[i])), clear) // TODO support save slice data, sql with case? association.Error = associationDB.Updates(reflectValue.Index(i).Addr().Interface()).Error } case reflect.Struct: // clear old data if clear && len(values) == 0 {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu May 04 11:30:45 GMT 2023 - 21.2K bytes - Viewed (0) -
tests/associations_many2many_test.go
// Prepare Data for Clear if err := DB.Model(&user2).Association("Languages").Append(&language); err != nil { t.Fatalf("Error happened when append Languages, got %v", err) } AssertAssociationCount(t, user2, "Languages", 1, "after prepare data") // Clear if err := DB.Model(&user2).Association("Languages").Clear(); err != nil { t.Errorf("Error happened when clear Languages, got %v", err) }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Jun 10 13:05:19 GMT 2023 - 13.2K bytes - Viewed (0) -
tests/associations_has_one_test.go
// Prepare Data for Clear account = Account{Number: "account-has-one-append"} if err := DB.Model(&user2).Association("Account").Append(&account); err != nil { t.Fatalf("Error happened when append Account, got %v", err) } AssertAssociationCount(t, user2, "Account", 1, "after prepare data") // Clear if err := DB.Model(&user2).Association("Account").Clear(); err != nil {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 6.8K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
// Clear if err := DB.Model(&user2).Association("Company").Clear(); err != nil { t.Errorf("Error happened when clear Company, got %v", err) } if err := DB.Model(&user2).Association("Manager").Clear(); err != nil { t.Errorf("Error happened when clear Manager, got %v", err) } AssertAssociationCount(t, user2, "Company", 0, "after clear")
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 9.3K bytes - Viewed (0) -
tests/named_polymorphic_test.go
} DB.Model(&hamster).Association("PreferredToy").Clear() if DB.Model(&hamster2).Association("PreferredToy").Count() != 0 { t.Errorf("Hamster's preferred toy should be cleared with Clear") } if DB.Model(&hamster2).Association("OtherToy").Count() != 1 { t.Errorf("Hamster's other toy should be still available") } DB.Model(&hamster).Association("OtherToy").Clear()
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jul 08 09:59:40 GMT 2020 - 4.2K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
} // Clear DB.Model(&blog2).Association("LocaleTags").Clear() if DB.Model(&blog).Association("LocaleTags").Count() != 3 { t.Fatalf("ZH Blog's tags should not be cleared when clear EN Blog's tags") } if DB.Model(&blog2).Association("LocaleTags").Count() != 0 { t.Fatalf("EN Blog's tags should be cleared when clear EN Blog's tags") }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 12.8K bytes - Viewed (0) -
tests/joins_table_test.go
} DB.Model(&person).Association("Addresses").Clear() if DB.Model(&person).Association("Addresses").Count() != 0 { t.Fatalf("Should deleted all addresses") } if DB.Unscoped().Model(&person).Association("Addresses").Count() != 2 { t.Fatalf("Should found soft deleted addresses with unscoped") } DB.Unscoped().Model(&person).Association("Addresses").Clear()
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Sep 10 13:46:18 GMT 2020 - 3.5K bytes - Viewed (0) -
misc/cgo/gmp/gmp.go
return "nil" } z.doinit() p := C.mpz_get_str(nil, 10, &z.i[0]) s := C.GoString(p) C.free(unsafe.Pointer(p)) return s } func (z *Int) destroy() { if z.init { C.mpz_clear(&z.i[0]) } z.init = false } /* * arithmetic */ // Add sets z = x + y and returns z. func (z *Int) Add(x, y *Int) *Int { x.doinit() y.doinit() z.doinit()
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Apr 11 16:34:30 GMT 2022 - 9.5K bytes - Viewed (0) -
internal/config/errors-utils.go
} } // Failed to identify what type of error this, return a simple UI error return Err{msg: err.Error()} } // FmtError converts a fatal error message to a more clear error // using some colors func FmtError(introMsg string, err error, jsonFlag bool) string { renderedTxt := "" uiErr := ErrorToErr(err) // JSON print if jsonFlag { // Message text in json should be simple
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Mar 06 16:56:10 GMT 2023 - 3.7K bytes - Viewed (0) -
cmd/xl-storage-format-v2-legacy.go
func (j *xlMetaV2Version) unmarshalV(v uint8, bts []byte) (o []byte, err error) { if v > xlMetaVersion { return bts, fmt.Errorf("unknown xlMetaVersion: %d", v) } // Clear omitempty fields: if j.ObjectV2 != nil && len(j.ObjectV2.PartIndices) > 0 { j.ObjectV2.PartIndices = j.ObjectV2.PartIndices[:0] } o, err = j.UnmarshalMsg(bts)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 19 16:43:43 GMT 2024 - 5.7K bytes - Viewed (0)