- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for UpdateClauses (0.11 sec)
-
callbacks/update.go
} } // Update update hook func Update(config *Config) func(db *gorm.DB) { supportReturning := utils.Contains(config.UpdateClauses, "RETURNING") return func(db *gorm.DB) { if db.Error != nil { return } if db.Statement.Schema != nil { for _, c := range db.Statement.Schema.UpdateClauses { db.Statement.AddClause(c) } } if db.Statement.SQL.Len() == 0 { db.Statement.SQL.Grow(180)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 05:44:55 UTC 2024 - 9.4K bytes - Viewed (0) -
schema/schema.go
field.Schema.QueryClauses = append(field.Schema.QueryClauses, fc.QueryClauses(field)...) } if fc, ok := fieldInterface.(UpdateClausesInterface); ok { field.Schema.UpdateClauses = append(field.Schema.UpdateClauses, fc.UpdateClauses(field)...) } if fc, ok := fieldInterface.(DeleteClausesInterface); ok { field.Schema.DeleteClauses = append(field.Schema.DeleteClauses, fc.DeleteClauses(field)...) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.7K bytes - Viewed (0) -
schema/interfaces.go
type QueryClausesInterface interface { QueryClauses(*Field) []clause.Interface } // UpdateClausesInterface update clauses interface type UpdateClausesInterface interface { UpdateClauses(*Field) []clause.Interface } // DeleteClausesInterface delete clauses interface type DeleteClausesInterface interface { DeleteClauses(*Field) []clause.Interface
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 980 bytes - Viewed (0) -
utils/tests/dummy_dialecter.go
return "dummy" } func (DummyDialector) Initialize(db *gorm.DB) error { callbacks.RegisterDefaultCallbacks(db, &callbacks.Config{ CreateClauses: []string{"INSERT", "VALUES", "ON CONFLICT", "RETURNING"}, UpdateClauses: []string{"UPDATE", "SET", "WHERE", "RETURNING"}, DeleteClauses: []string{"DELETE", "FROM", "WHERE", "RETURNING"}, LastInsertIDReversed: true, }) return nil }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 06 06:03:31 UTC 2023 - 2.2K bytes - Viewed (0) -
soft_delete.go
clause.Eq{Column: clause.Column{Table: clause.CurrentTable, Name: sd.Field.DBName}, Value: sd.ZeroValue}, }}) stmt.Clauses["soft_delete_enabled"] = clause.Clause{} } } func (DeletedAt) UpdateClauses(f *schema.Field) []clause.Interface { return []clause.Interface{SoftDeleteUpdateClause{Field: f, ZeroValue: parseZeroValueTag(f)}} } type SoftDeleteUpdateClause struct { ZeroValue sql.NullString
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1)