Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 325 for Select (0.15 sec)

  1. internal/s3select/select.go

    	s2Type     CompressionType = "S2"
    	snappyType CompressionType = "SNAPPY"
    )
    
    const (
    	maxRecordSize = 1 << 20 // 1 MiB
    )
    
    var parquetSupport bool
    
    func init() {
    	parquetSupport = env.Get("MINIO_API_SELECT_PARQUET", config.EnableOff) == config.EnableOn
    }
    
    var bufPool = sync.Pool{
    	New: func() interface{} {
    		// make a buffer with a reasonable capacity.
    		return bytes.NewBuffer(make([]byte, 0, maxRecordSize))
    	},
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 21K bytes
    - Viewed (0)
  2. 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)
  3. clause/select_test.go

    	}{
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}},
    			"SELECT * FROM `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Select{
    				Columns: []clause.Column{clause.PrimaryColumn},
    			}, clause.From{}},
    			"SELECT `users`.`id` FROM `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Select{
    				Columns: []clause.Column{clause.PrimaryColumn},
    			}, clause.Select{
    				Columns: []clause.Column{{Name: "name"}},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:06:43 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  4. internal/s3select/select_test.go

    mango`,
    		},
    		{
    			name:  "Select column simplest",
    			query: `select qty from S3Object`,
    			wantResult: `1
    3`,
    		},
    		{
    			name:  "Select column with table name prefix",
    			query: `select S3Object.qty from S3Object`,
    			wantResult: `1
    3`,
    		},
    		{
    			name:  "Select column without table alias",
    			query: `select qty from S3Object s`,
    			wantResult: `1
    3`,
    		},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 76.2K bytes
    - Viewed (0)
  5. internal/s3select/select_benchmark_test.go

    func BenchmarkSelectAll_10M(b *testing.B) {
    	benchmarkSelectAll(b, 10*humanize.MiByte)
    }
    
    func benchmarkSingleCol(b *testing.B, count int) {
    	benchmarkSelect(b, count, "select id from S3Object")
    }
    
    // BenchmarkSingleRow_100K - benchmark SELECT column function with 100k records.
    func BenchmarkSingleCol_100K(b *testing.B) {
    	benchmarkSingleCol(b, 1e5)
    }
    
    // BenchmarkSelectAll_1M - benchmark * function with 1m records.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 5K bytes
    - Viewed (0)
  6. chainable_api.go

    //
    // Use Select when you only want a subset of the fields. By default, GORM will select all fields.
    // Select accepts both string arguments and arrays.
    //
    //	// Select name and age of user using multiple arguments
    //	db.Select("name", "age").Find(&users)
    //	// Select name and age of user using an array
    //	db.Select([]string{"name", "age"}).Find(&users)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  7. 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)
  8. 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)
  9. cmd/peer-rest-client.go

    	}
    	st.Results(func(b *grid.Bytes) error {
    		select {
    		case listenCh <- *b:
    		default:
    			// Do not block on slow receivers.
    			b.Recycle()
    		}
    		return nil
    	})
    }
    
    // Listen - listen on peers.
    func (client *peerRESTClient) Listen(ctx context.Context, listenCh chan<- []byte, v url.Values) {
    	go func() {
    		for {
    			client.doListen(ctx, listenCh, v)
    			select {
    			case <-ctx.Done():
    				return
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  10. clause/limit_test.go

    			"SELECT * FROM `users` LIMIT ?",
    			[]interface{}{limit0},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Limit{Offset: 20}},
    			"SELECT * FROM `users` OFFSET ?",
    			[]interface{}{20},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Limit{Offset: 20}, clause.Limit{Offset: 30}},
    			"SELECT * FROM `users` OFFSET ?",
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 2.3K bytes
    - Viewed (0)
Back to top