Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 371 for qselect (0.18 sec)

  1. tests/query_test.go

    		t.Fatalf("Build Select with slice, but got %v", r.Statement.SQL.String())
    	}
    
    	// SELECT COALESCE(age,'42') FROM users;
    	r = dryDB.Table("users").Select("COALESCE(age,?)", 42).Find(&User{})
    	if !regexp.MustCompile(`SELECT COALESCE\(age,.*\) FROM .*users.*`).MatchString(r.Statement.SQL.String()) {
    		t.Fatalf("Build Select with func, but got %v", r.Statement.SQL.String())
    	}
    
    	// named arguments
    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. internal/s3select/sql/parser_test.go

    	p := participle.MustBuild(
    		&Select{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    	)
    
    	s := Select{}
    	cases := []string{
    		"select * from s3object",
    		"select a, b from s3object s",
    		"select a, b from s3object as s",
    		"select a, b from s3object as s where a = 1",
    		"select a, b from s3object s where a = 1",
    		"select a, b from s3object where a = 1",
    	}
    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)
  3. tests/table_test.go

    	}
    
    	r = dryDB.Table("gorm.user").Select("name").Find(&User{}).Statement
    	if !regexp.MustCompile("SELECT .name. FROM .gorm.\\..user. WHERE .user.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    	r = dryDB.Select("name").Find(&UserWithTable{}).Statement
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  4. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/RichReportScrapper.kt

        select("tr.severity-$severity").map { tr ->
            tr.select("td")[1]
                .select("span")
                .text()
                .substringBefore(" If you did this intentionally")
        }
    
    
    private
    fun Document.scrapeMessagesForSeverity(severity: String): List<ReportMessage> =
    
        select("tr.severity-$severity").map { tr ->
            val entry = tr.select("td")[1]
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Thu Sep 21 16:02:23 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  5. clause/benchmarks_test.go

    		clauses := []clause.Interface{clause.Select{}, clause.From{}, clause.Where{Exprs: []clause.Expression{clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.Gt{Column: "age", Value: 18}, clause.Or(clause.Neq{Column: "name", Value: "jinzhu"})}}}
    
    		for _, clause := range clauses {
    			stmt.AddClause(clause)
    		}
    
    		stmt.Build("SELECT", "FROM", "WHERE")
    		_ = stmt.SQL.String()
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Oct 07 12:14:14 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  6. tests/scopes_test.go

    	}
    
    	var maxId int64
    	userTable := func(db *gorm.DB) *gorm.DB {
    		return db.WithContext(context.Background()).Table("users")
    	}
    	if err := DB.Scopes(userTable).Select("max(id)").Scan(&maxId).Error; err != nil {
    		t.Errorf("select max(id)")
    	}
    }
    
    func TestComplexScopes(t *testing.T) {
    	tests := []struct {
    		name     string
    		queryFn  func(tx *gorm.DB) *gorm.DB
    		expected string
    	}{
    		{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  7. tests/count_test.go

    	result := dryDB.Table("users").Select("name").Count(&count)
    	if !regexp.MustCompile(`SELECT COUNT\(.name.\) FROM .*users.*`).MatchString(result.Statement.SQL.String()) {
    		t.Fatalf("Build count with select, but got %v", result.Statement.SQL.String())
    	}
    
    	result = dryDB.Table("users").Distinct("name").Count(&count)
    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)
  8. clause/where_test.go

    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    				Exprs: []clause.Expression{clause.Or(clause.Neq{Column: "name", Value: "jinzhu"}), clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.Gt{Column: "age", Value: 18}},
    			}},
    			"SELECT * FROM `users` WHERE `users`.`id` = ? OR `name` <> ? AND `age` > ?",
    			[]interface{}{"1", "jinzhu", 18},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  9. docs/select/README.md

    # Select API Quickstart Guide [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io)
    
    Traditional retrieval of objects is always as whole entities, i.e GetObject for a 5 GiB object, will always return 5 GiB of data. S3 Select API allows us to retrieve a subset of data by using simple SQL expressions. By using Select API to retrieve only the data needed by the application, drastic performance improvements can be achieved.
    
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Sep 29 04:28:45 GMT 2022
    - 6.5K bytes
    - Viewed (0)
  10. tests/soft_delete_test.go

    		t.Fatalf("invalid sql generated, got %v", sql)
    	}
    
    	sql = DB.Session(&gorm.Session{DryRun: true}).Table("user u").Select("name").Find(&User{}).Statement.SQL.String()
    	if !regexp.MustCompile(`SELECT .name. FROM user u WHERE .u.\..deleted_at. IS NULL`).MatchString(sql) {
    		t.Errorf("Table with escape character, got %v", sql)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 5.7K bytes
    - Viewed (0)
Back to top