Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for DISTINCT (0.2 sec)

  1. tests/distinct_test.go

    	var names []string
    	DB.Table("users").Where("name like ?", "distinct%").Order("name").Pluck("name", &names)
    	AssertEqual(t, names, []string{"distinct", "distinct", "distinct", "distinct-2", "distinct-3"})
    
    	var names1 []string
    	DB.Model(&User{}).Where("name like ?", "distinct%").Distinct().Order("name").Pluck("Name", &names1)
    
    	AssertEqual(t, names1, []string{"distinct", "distinct-2", "distinct-3"})
    
    	var names2 []string
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  2. tests/count_test.go

    		t.Fatalf("Build count with select, but got %v", result.Statement.SQL.String())
    	}
    
    	result = dryDB.Table("users").Distinct("name").Count(&count)
    	if !regexp.MustCompile(`SELECT COUNT\(DISTINCT\(.name.\)\) FROM .*users.*`).MatchString(result.Statement.SQL.String()) {
    		t.Fatalf("Build count with select, but got %v", result.Statement.SQL.String())
    	}
    
    	var count4 int64
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  3. clause/select.go

    package clause
    
    // Select select attrs when querying, updating, creating
    type Select struct {
    	Distinct   bool
    	Columns    []Column
    	Expression Expression
    }
    
    func (s Select) Name() string {
    	return "SELECT"
    }
    
    func (s Select) Build(builder Builder) {
    	if len(s.Columns) > 0 {
    		if s.Distinct {
    			builder.WriteString("DISTINCT ")
    		}
    
    		for idx, column := range s.Columns {
    			if idx > 0 {
    				builder.WriteByte(',')
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jul 14 07:51:24 GMT 2021
    - 1.1K bytes
    - Viewed (0)
  4. internal/s3select/sql/parser_test.go

    			t.Fatalf("%d: %v", i, err)
    		}
    
    		// repr.Println(s, repr.Indent("  "), repr.OmitEmpty(true))
    	}
    }
    
    func TestSqlLexerArithOps(t *testing.T) {
    	s := bytes.NewBuffer([]byte("year from select month hour distinct"))
    	lex, err := sqlLexer.Lex(s)
    	if err != nil {
    		t.Fatal(err)
    	}
    	tokens, err := lexer.ConsumeAll(lex)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(tokens) != 7 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  5. internal/bucket/replication/replication.go

    				continue
    			}
    		}
    		return true
    	}
    	return false
    }
    
    // FilterTargetArns returns a slice of distinct target arns in the config
    func (c Config) FilterTargetArns(obj ObjectOpts) []string {
    	var arns []string
    
    	tgtsMap := make(map[string]struct{})
    	rules := c.FilterActionableRules(obj)
    	for _, rule := range rules {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 8.9K bytes
    - Viewed (0)
Back to top