- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 30 for addMirror (0.04 seconds)
-
callbacks/update.go
if db.Statement.Schema.BeforeSave { if i, ok := value.(BeforeSaveInterface); ok { called = true db.AddError(i.BeforeSave(tx)) } } if db.Statement.Schema.BeforeUpdate { if i, ok := value.(BeforeUpdateInterface); ok { called = true db.AddError(i.BeforeUpdate(tx)) } } return called }) } } // Update update hookCreated: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 9.6K bytes - Click Count (0) -
scan.go
} db.scanIntoStruct(rows, reflectValue, values, fields, joinFields) } 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) }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 10.4K bytes - Click Count (0) -
callbacks/helper.go
columns := make([]string, 0, len(mapValues)) // when the length of mapValues is zero,return directly here // no need to call stmt.SelectAndOmitColumns method if len(mapValues) == 0 { stmt.AddError(gorm.ErrEmptySlice) return } var ( result = make(map[string][]interface{}, len(mapValues)) selectColumns, restricted = stmt.SelectAndOmitColumns(true, false) )
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Thu Apr 14 12:32:57 GMT 2022 - 3.7K bytes - Click Count (0) -
statement.go
stmt.AddError(field.Set(stmt.Context, stmt.ReflectValue.Index(stmt.CurDestIndex), value)) } case reflect.Struct: if !stmt.ReflectValue.CanAddr() { stmt.AddError(ErrInvalidValue) return } stmt.AddError(field.Set(stmt.Context, stmt.ReflectValue, value)) } } else { stmt.AddError(ErrInvalidField) } } else { stmt.AddError(ErrInvalidField) } }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Fri Sep 12 04:33:27 GMT 2025 - 20.9K bytes - Click Count (0) -
callbacks/preload.go
switch reflectFieldValue.Kind() { case reflect.Struct: tx.AddError(rel.Field.Set(tx.Statement.Context, data, elem.Interface())) case reflect.Slice, reflect.Array: if reflectFieldValue.Type().Elem().Kind() == reflect.Ptr { tx.AddError(rel.Field.Set(tx.Statement.Context, data, reflect.Append(reflectFieldValue, elem).Interface())) } else {
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 11.7K bytes - Click Count (0) -
callbacks/callmethod.go
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 846 bytes - Click Count (0) -
callbacks/query.go
if !db.DryRun && db.Error == nil { rows, err := db.Statement.ConnPool.QueryContext(db.Statement.Context, db.Statement.SQL.String(), db.Statement.Vars...) if err != nil { db.AddError(err) return } defer func() { db.AddError(rows.Close()) }() gorm.Scan(rows, db, 0) if db.Statement.Result != nil { db.Statement.Result.RowsAffected = db.RowsAffected } } } }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 10.4K bytes - Click Count (3) -
tests/error_translator_test.go
err := db.AddError(untranslatedErr) if !errors.Is(err, untranslatedErr) { t.Fatalf("expected err: %v got err: %v", untranslatedErr, err) } // it should translate error when the TranslateError flag is true db, _ = gorm.Open(tests.DummyDialector{TranslatedErr: translatedErr}, &gorm.Config{TranslateError: true}) err = db.AddError(untranslatedErr) if !errors.Is(err, translatedErr) {
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Jul 21 02:46:58 GMT 2025 - 3.1K bytes - Click Count (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/FindBadMultiLangSnippets.java
try (java.util.stream.Stream<String> stream = Files.lines(file.toPath())) { stream.forEach(lines::add); } catch (IOException ex) { // If a file can't be read, add an error addError(errors, file, new Error(1, "Failed to read file: " + ex.getMessage())); return; } boolean inExample = false; // between ==== ... ==== List<Snippet> currentSnippets = new ArrayList<>();
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Fri Aug 29 10:12:17 GMT 2025 - 7.2K bytes - Click Count (0) -
callbacks.go
if errors.Is(err, schema.ErrUnsupportedDataType) && stmt.Table == "" && stmt.TableExpr == nil { db.AddError(fmt.Errorf("%w: Table not set, please set it like: db.Model(&user) or db.Table(\"users\")", err)) } else { db.AddError(err) } } } // assign stmt.ReflectValue if stmt.Dest != nil { stmt.ReflectValue = reflect.ValueOf(stmt.Dest)
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Tue Aug 26 06:24:29 GMT 2025 - 8.8K bytes - Click Count (0)