- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for QueryClauses (0.13 sec)
-
callbacks/callbacks.go
enableTransaction := func(db *gorm.DB) bool { return !db.SkipDefaultTransaction } if len(config.CreateClauses) == 0 { config.CreateClauses = createClauses } if len(config.QueryClauses) == 0 { config.QueryClauses = queryClauses } if len(config.DeleteClauses) == 0 { config.DeleteClauses = deleteClauses } if len(config.UpdateClauses) == 0 { config.UpdateClauses = updateClauses }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Oct 27 23:56:55 UTC 2021 - 3.3K bytes - Viewed (0) -
schema/schema.go
field.Schema.CreateClauses = append(field.Schema.CreateClauses, fc.CreateClauses(field)...) } if fc, ok := fieldInterface.(QueryClausesInterface); ok { 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)...) }
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 CreateClausesInterface interface { CreateClauses(*Field) []clause.Interface } // QueryClausesInterface query clauses interface type QueryClausesInterface interface { QueryClauses(*Field) []clause.Interface } // UpdateClausesInterface update clauses interface type UpdateClausesInterface interface { UpdateClauses(*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) -
callbacks/query.go
defer func() { db.AddError(rows.Close()) }() gorm.Scan(rows, db, 0) } } } func BuildQuerySQL(db *gorm.DB) { if db.Statement.Schema != nil { for _, c := range db.Statement.Schema.QueryClauses { db.Statement.AddClause(c) } } if db.Statement.SQL.Len() == 0 { db.Statement.SQL.Grow(100) clauseSelect := clause.Select{Distinct: db.Statement.Distinct}
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
soft_delete.go
if string(b) == "null" { n.Valid = false return nil } err := json.Unmarshal(b, &n.Time) if err == nil { n.Valid = true } return err } func (DeletedAt) QueryClauses(f *schema.Field) []clause.Interface { return []clause.Interface{SoftDeleteQueryClause{Field: f, ZeroValue: parseZeroValueTag(f)}} } func parseZeroValueTag(f *schema.Field) 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) -
tests/associations_test.go
AssertEqual(t, err, gorm.ErrPrimaryKeyRequired) } type ( myType string emptyQueryClause struct { Field *schema.Field } ) func (myType) QueryClauses(f *schema.Field) []clause.Interface { return []clause.Interface{emptyQueryClause{Field: f}} } func (sd emptyQueryClause) Name() string { return "empty" }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 08 08:29:09 UTC 2023 - 10.9K bytes - Viewed (0) -
association.go
if !tx.Statement.Unscoped && len(association.Relationship.JoinTable.QueryClauses) > 0 { joinStmt := Statement{DB: tx, Context: tx.Statement.Context, Schema: association.Relationship.JoinTable, Table: association.Relationship.JoinTable.Table, Clauses: map[string]clause.Clause{}} for _, queryClause := range association.Relationship.JoinTable.QueryClauses { joinStmt.AddClause(queryClause) } joinStmt.Build("WHERE")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0)