- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 341 for struct (0.08 sec)
-
tests/hooks_test.go
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0) -
callbacks/helper_test.go
package callbacks import ( "reflect" "testing" "gorm.io/gorm" "gorm.io/gorm/clause" ) func TestLoadOrStoreVisitMap(t *testing.T) { var vm visitMap var loaded bool type testM struct { Name string } t1 := testM{Name: "t1"} t2 := testM{Name: "t2"} t3 := testM{Name: "t3"} vm = make(visitMap) if loaded = loadOrStoreVisitMap(&vm, reflect.ValueOf(&t1)); loaded {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Mar 05 02:22:57 UTC 2024 - 3.4K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
AssertAssociationCount(t, users[1], "Company", 1, "After other user Delete") } func TestBelongsToDefaultValue(t *testing.T) { type Org struct { ID string } type BelongsToUser struct { OrgID string Org Org `gorm:"default:NULL"` } tx := DB.Session(&gorm.Session{}) tx.Config.DisableForeignKeyConstraintWhenMigrating = true
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0) -
internal/stmt_store/stmt_store.go
package stmt_store import ( "context" "database/sql" "math" "sync" "time" "gorm.io/gorm/internal/lru" ) type Stmt struct { *sql.Stmt Transaction bool prepared chan struct{} prepareErr error } func (stmt *Stmt) Error() error { return stmt.prepareErr } func (stmt *Stmt) Close() error { <-stmt.prepared if stmt.Stmt != nil { return stmt.Stmt.Close() } return nil
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun Apr 27 06:05:16 UTC 2025 - 6K bytes - Viewed (0) -
soft_delete.go
if v, ok := f.TagSettings["ZEROVALUE"]; ok { if _, err := now.Parse(v); err == nil { return sql.NullString{String: v, Valid: true} } } return sql.NullString{Valid: false} } type SoftDeleteQueryClause struct { ZeroValue sql.NullString Field *schema.Field } func (sd SoftDeleteQueryClause) Name() string { return "" } func (sd SoftDeleteQueryClause) Build(clause.Builder) { }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
tests/joins_test.go
}) } func TestJoinsPreload_Issue7013_RelationEmpty(t *testing.T) { type ( Furniture struct { gorm.Model OwnerID *uint } Owner struct { gorm.Model Furnitures []Furniture CompanyID *uint Company Company } Building struct { gorm.Model Name string OwnerID *uint Owner Owner } )
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 15K bytes - Viewed (0) -
clause/joins.go
import "gorm.io/gorm/utils" type JoinType string const ( CrossJoin JoinType = "CROSS" InnerJoin JoinType = "INNER" LeftJoin JoinType = "LEFT" RightJoin JoinType = "RIGHT" ) type JoinTarget struct { Type JoinType Association string Subquery Expression Table string } func Has(name string) JoinTarget { return JoinTarget{Type: InnerJoin, Association: name} }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 1.5K bytes - Viewed (0) -
callbacks/preload.go
if embeddedRelations == nil { return nil } names := make([]string, 0, len(embeddedRelations.Relations)+len(embeddedRelations.EmbeddedRelations)) for _, relation := range embeddedRelations.Relations { // skip first struct name names = append(names, strings.Join(relation.Field.EmbeddedBindNames[1:], ".")) } for _, relations := range embeddedRelations.EmbeddedRelations { names = append(names, embeddedValues(relations)...) }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 11.7K bytes - Viewed (0) -
clause/delete_test.go
package clause_test import ( "fmt" "testing" "gorm.io/gorm/clause" ) func TestDelete(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{clause.Delete{}, clause.From{}}, "DELETE FROM `users`", nil, }, { []clause.Interface{clause.Delete{Modifier: "LOW_PRIORITY"}, clause.From{}},
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Jun 02 01:18:01 UTC 2020 - 608 bytes - Viewed (0) -
schema/index.go
import ( "fmt" "sort" "strconv" "strings" ) type Index struct { Name string Class string // UNIQUE | FULLTEXT | SPATIAL Type string // btree, hash, gist, spgist, gin, and brin Where string Comment string Option string // WITH PARSER parser_name Fields []IndexOption // Note: IndexOption's Field maybe the same } type IndexOption struct { *Field Expression string Sort string // DESC, ASC
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed May 21 02:35:56 UTC 2025 - 3.8K bytes - Viewed (0)