Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for tota (0.13 sec)

  1. tests/joins_test.go

    	stmt = dryDB.Table(`table_employees`).Select(`id, name, iv.total, iv.paid, iv.balance`).Joins(`LEFT JOIN (?) AS iv ON iv.seller = table_employees.id`, iv).Scan(&user).Statement
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
  2. tests/group_by_test.go

    		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)
    	}
    
    	if err := DB.Model(&User{}).Select("name, sum(age) as total").Where("name LIKE ?", "groupby%").Group("name").Having("name = ?", "groupby1").Row().Scan(&name, &total); err != nil {
    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. logger/logger.go

    	MagentaBold = "\033[35;1m"
    	RedBold     = "\033[31;1m"
    	YellowBold  = "\033[33;1m"
    )
    
    // LogLevel log level
    type LogLevel int
    
    const (
    	// Silent silent log level
    	Silent LogLevel = iota + 1
    	// Error error log level
    	Error
    	// Warn warn log level
    	Warn
    	// Info info log level
    	Info
    )
    
    // Writer log writer interface
    type Writer interface {
    	Printf(string, ...interface{})
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  4. tests/sql_builder_test.go

    	DB.Create(&users)
    
    	rows, err := DB.Select("name, count(*) as total").Table("users").Group("name").Having("name IN ?", []string{users[0].Name, users[1].Name}).Rows()
    	if err != nil {
    		t.Fatalf("got error %v", err)
    	}
    
    	defer rows.Close()
    	for rows.Next() {
    		var name string
    		var total int64
    		rows.Scan(&name, &total)
    
    		if name == users[0].Name && total != 3 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  5. schema/relationship.go

    				relation.References = append(relation.References, &Reference{
    					PrimaryKey: rf,
    					ForeignKey: f,
    				})
    			}
    		}
    	}
    }
    
    type guessLevel int
    
    const (
    	guessGuess guessLevel = iota
    	guessBelongs
    	guessEmbeddedBelongs
    	guessHas
    	guessEmbeddedHas
    )
    
    func (schema *Schema) guessRelation(relation *Relationship, field *Field, cgl guessLevel) {
    	var (
    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)
  6. tests/query_test.go

    	}); result.Error != nil || result.RowsAffected != 6 {
    		t.Errorf("Failed to batch find, got error %v, rows affected: %v", result.Error, result.RowsAffected)
    	}
    
    	if totalBatch != 6 {
    		t.Errorf("incorrect total batch, expects: %v, got %v", 6, totalBatch)
    	}
    
    	var count int64
    	DB.Model(&User{}).Where("name = ?", "find_in_batches_new").Count(&count)
    	if count != 6 {
    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)
Back to top