Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for uuid (0.12 sec)

  1. schema/relationship_test.go

    		gorm.Model
    		Aux  string
    		UUID string
    	}
    
    	type User struct {
    		gorm.Model
    		Name string
    		UUID string
    		Aux  *UserAux `gorm:"foreignkey:UUID;references:UUID"`
    	}
    
    	checkStructRelation(t, &User{},
    		Relation{
    			Name: "Aux", Type: schema.HasOne, Schema: "User", FieldSchema: "UserAux",
    			References: []Reference{
    				{"UUID", "User", "UUID", "UserAux", "", true},
    			},
    		},
    	)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  2. tests/postgres_test.go

    		t.Fatalf("failed to found column log_id")
    	}
    }
    
    type Post struct {
    	ID         uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"`
    	Title      string
    	Categories []*Category `gorm:"Many2Many:post_categories"`
    }
    
    type Category struct {
    	ID    uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"`
    	Title string
    	Posts []*Post `gorm:"Many2Many:post_categories"`
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Oct 08 09:16:32 GMT 2022
    - 6.4K bytes
    - Viewed (3)
  3. schema/naming_test.go

    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue May 30 02:00:48 GMT 2023
    - 7K bytes
    - Viewed (0)
  4. schema/naming.go

    }
    
    var (
    	// https://github.com/golang/lint/blob/master/lint.go#L770
    	commonInitialisms         = []string{"API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "LHS", "QPS", "RAM", "RHS", "RPC", "SLA", "SMTP", "SSH", "TLS", "TTL", "UID", "UI", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XSRF", "XSS"}
    	commonInitialismsReplacer *strings.Replacer
    )
    
    func init() {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  5. tests/migrate_test.go

    	if DB.Dialector.Name() != "postgres" {
    		return
    	}
    
    	type MissPKLanguage struct {
    		ID   string `gorm:"type:uuid;default:uuid_generate_v4()"`
    		Name string
    	}
    
    	type MissPKUser struct {
    		ID              string           `gorm:"type:uuid;default:uuid_generate_v4()"`
    		MissPKLanguages []MissPKLanguage `gorm:"many2many:miss_pk_user_languages;"`
    	}
    
    	var err error
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  6. tests/create_test.go

    			"name":    "cat",
    			"user_id": gorm.Expr("(?)", DB.Table("(?) as tmp", subQuery).Select("@uid:=id")),
    		},
    		{
    			"name":    "dog",
    			"user_id": gorm.Expr("@uid"),
    		},
    	})
    
    	if !regexp.MustCompile(`INSERT INTO .pets. \(.name.,.user_id.\) .*VALUES \(.+,\(SELECT @uid:=id FROM \(SELECT id FROM .users. WHERE name=.+\) as tmp\)\),\(.+,@uid\)`).MatchString(result.Statement.SQL.String()) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
Back to top