- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for DeleteClauses (0.07 sec)
-
callbacks/delete.go
} } } func Delete(config *Config) func(db *gorm.DB) { supportReturning := utils.Contains(config.DeleteClauses, "RETURNING") return func(db *gorm.DB) { if db.Error != nil { return } if db.Statement.Schema != nil { for _, c := range db.Statement.Schema.DeleteClauses { db.Statement.AddClause(c) } } if db.Statement.SQL.Len() == 0 { db.Statement.SQL.Grow(100)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Feb 25 02:48:23 UTC 2022 - 5.6K bytes - Viewed (0) -
schema/schema.go
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)...) } } } return schema, schema.err } // This unrolling is needed to show to the compiler the exact set of methods // that can be used on the modelType.
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 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
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 } func (DummyDialector) DefaultValueOf(field *schema.Field) clause.Expression {
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
} func (sd SoftDeleteUpdateClause) ModifyStatement(stmt *Statement) { if stmt.SQL.Len() == 0 && !stmt.Statement.Unscoped { SoftDeleteQueryClause(sd).ModifyStatement(stmt) } } func (DeletedAt) DeleteClauses(f *schema.Field) []clause.Interface { return []clause.Interface{SoftDeleteDeleteClause{Field: f, ZeroValue: parseZeroValueTag(f)}} } type SoftDeleteDeleteClause 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)