Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for grow (0.02 sec)

  1. src/bufio/bufio.go

    func (b *Reader) ReadString(delim byte) (string, error) {
    	full, frag, n, err := b.collectFragments(delim)
    	// Allocate new buffer to hold the full pieces and the fragment.
    	var buf strings.Builder
    	buf.Grow(n)
    	// Copy full pieces and fragment in.
    	for _, fb := range full {
    		buf.Write(fb)
    	}
    	buf.Write(frag)
    	return buf.String(), err
    }
    
    // WriteTo implements io.WriterTo.
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Sep 03 14:04:47 UTC 2025
    - 22K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    // dropped from the byte slice with no replacement. The characters in s and the
    // output are interpreted as UTF-8-encoded code points.
    func Map(mapping func(r rune) rune, s []byte) []byte {
    	// In the worst case, the slice can grow when mapped, making
    	// things unpleasant. But it's so rare we barge in assuming it's
    	// fine. It could also shrink but that falls out naturally.
    	b := make([]byte, 0, len(s))
    	for i := 0; i < len(s); {
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Sep 03 14:04:47 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  3. generics.go

    	var data []T
    	return g.g.apply(ctx).FindInBatches(&data, batchSize, func(tx *DB, batch int) error {
    		return fc(data, batch)
    	}).Error
    }
    
    func (g execG[T]) Row(ctx context.Context) *sql.Row {
    	return g.g.apply(ctx).Row()
    }
    
    func (g execG[T]) Rows(ctx context.Context) (*sql.Rows, error) {
    	return g.g.apply(ctx).Rows()
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  4. tests/generics_test.go

    	if err := gorm.G[User](DB).Create(ctx, &user); err != nil {
    		t.Fatalf("Create failed: %v", err)
    	}
    
    	row := gorm.G[User](DB).Raw("SELECT name FROM ? WHERE id = ?", clause.Table{Name: clause.CurrentTable}, user.ID).Row(ctx)
    	var name string
    	if err := row.Scan(&name); err != nil {
    		t.Fatalf("Row scan failed: %v", err)
    	}
    	if name != user.Name {
    		t.Errorf("expected %s, got %s", user.Name, name)
    	}
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 28K bytes
    - Viewed (0)
Back to top