Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 67 of 67 for id (0.12 sec)

  1. tests/query_test.go

    		}
    	}
    
    	for idx, id := range ids {
    		if int(id) != int(users[idx].ID) {
    			t.Errorf("Unexpected result on pluck id, got %+v", ids)
    		}
    	}
    
    	for idx, id := range ids2 {
    		if int(id) != int(users[idx].ID+1) {
    			t.Errorf("Unexpected result on pluck id, got %+v", ids)
    		}
    	}
    
    	var times []time.Time
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  2. tests/associations_many2many_test.go

    	AssertEqual(t, nil, err)
    
    	var findUser1 User
    	err = DB.Preload("Languages").Where("id = ?", user1.ID).First(&findUser1).Error
    	AssertEqual(t, nil, err)
    	AssertEqual(t, user1, findUser1)
    
    	var findUser2 User
    	err = DB.Preload("Languages").Where("id = ?", user2.ID).First(&findUser2).Error
    	AssertEqual(t, nil, err)
    	AssertEqual(t, user2, findUser2)
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
  3. clause/expression_test.go

    		},
    		ExpectedVars: []interface{}{100},
    		Result:       "SUM(`id`) = ?",
    	}, {
    		Expressions: []clause.Expression{
    			clause.Gte{Column: clause.Expr{SQL: "SUM(?)", Vars: []interface{}{clause.Column{Table: "users", Name: "id"}}}, Value: 100},
    		},
    		ExpectedVars: []interface{}{100},
    		Result:       "SUM(`users`.`id`) >= ?",
    	}}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Aug 10 05:34:33 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  4. schema/schema.go

    }
    
    // LookUpFieldByBindName looks for the closest field in the embedded struct.
    //
    //	type Struct struct {
    //		Embedded struct {
    //			ID string // is selected by LookUpFieldByBindName([]string{"Embedded", "ID"}, "ID")
    //		}
    //		ID string // is selected by LookUpFieldByBindName([]string{"ID"}, "ID")
    //	}
    func (schema Schema) LookUpFieldByBindName(bindNames []string, name string) *Field {
    	if len(bindNames) == 0 {
    		return nil
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  5. tests/tests_all.sh

          SQLCMDPASSWORD=LoremIpsum86 sqlcmd -U sa -S localhost:9930 -Q "IF DB_ID('gorm') IS NULL CREATE DATABASE gorm" > /dev/null || true
          SQLCMDPASSWORD=LoremIpsum86 sqlcmd -U sa -S localhost:9930 -Q "IF SUSER_ID (N'gorm') IS NULL CREATE LOGIN gorm WITH PASSWORD = 'LoremIpsum86';" > /dev/null || true
    Shell Script
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  6. tests/default_value_test.go

    		Created time.Time `gorm:"default:2000-01-02"`
    		Enabled bool      `gorm:"default:true"`
    	}
    
    	harumph2 := Harumph2{ID: 2, Email: "******@****.***"}
    	if err := DB.Table("harumphs").Create(&harumph2).Error; err != nil {
    		t.Fatalf("Failed to create data with default value, got error: %v", err)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  7. schema/relationship.go

    			if len(primaryFields) == 1 {
    				lookUpNames = append(lookUpNames, strings.TrimSuffix(lookUpName, primaryField.Name)+"ID",
    					strings.TrimSuffix(lookUpName, primaryField.Name)+"Id", schema.namer.ColumnName(foreignSchema.Table,
    						strings.TrimSuffix(lookUpName, primaryField.Name)+"ID"))
    			}
    
    			for _, name := range lookUpNames {
    				if f := foreignSchema.LookUpFieldByBindName(field.BindNames, name); f != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top