Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Sum (0.36 sec)

  1. go.sum

    qqxhb <******@****.***> 1692452011 +0800
    Plain Text
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Aug 19 13:33:31 GMT 2023
    - 336 bytes
    - Viewed (0)
  2. tests/group_by_test.go

    	var total int
    	if err := DB.Model(&User{}).Select("name, sum(age)").Where("name = ?", "groupby").Group("name").Row().Scan(&name, &total); err != nil {
    		t.Errorf("no error should happen, but got %v", err)
    	}
    
    	if name != "groupby" || total != 60 {
    		t.Errorf("name should be groupby, but got %v, total should be 60, but got %v", name, total)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  3. schema/naming.go

    	if ns.IdentifierMaxLength == 0 {
    		ns.IdentifierMaxLength = 64
    	}
    
    	if utf8.RuneCountInString(formattedName) > ns.IdentifierMaxLength {
    		h := sha1.New()
    		h.Write([]byte(formattedName))
    		bs := h.Sum(nil)
    
    		formattedName = formattedName[0:ns.IdentifierMaxLength-8] + hex.EncodeToString(bs)[:8]
    	}
    	return formattedName
    }
    
    var (
    	// https://github.com/golang/lint/blob/master/lint.go#L770
    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)
  4. tests/scan_test.go

    		t.Errorf("Should find expected results")
    	}
    
    	var ages int
    	if err := DB.Table("users").Where("name = ? or name = ?", user2.Name, user3.Name).Select("SUM(age)").Scan(&ages).Error; err != nil || ages != 30 {
    		t.Fatalf("failed to scan ages, got error %v, ages: %v", err, ages)
    	}
    
    	var name string
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat May 28 14:18:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  5. clause/expression_test.go

    	}, {
    		Expressions: []clause.Expression{
    			clause.Eq{Column: clause.Expr{SQL: "SUM(?)", Vars: []interface{}{clause.Column{Name: "id"}}}, Value: 100},
    		},
    		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},
    		},
    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)
  6. tests/.gitignore

    go.sum...
    Plain Text
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Jul 28 06:46:48 GMT 2020
    - 7 bytes
    - Viewed (0)
Back to top