Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 4,024 for Scan (0.2 sec)

  1. scan.go

    		field.NewValuePool.Put(values[idx])
    	}
    }
    
    // ScanMode scan data mode
    type ScanMode uint8
    
    // scan modes
    const (
    	ScanInitialized         ScanMode = 1 << 0 // 1
    	ScanUpdate              ScanMode = 1 << 1 // 2
    	ScanOnConflictDoNothing ScanMode = 1 << 2 // 4
    )
    
    // Scan scan rows into db statement
    func Scan(rows Rows, db *DB, mode ScanMode) {
    	var (
    		columns, _          = rows.Columns()
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Mar 15 06:14:48 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  2. src/bufio/scan.go

    	return s.err
    }
    
    // Bytes returns the most recent token generated by a call to [Scanner.Scan].
    // The underlying array may point to data that will be overwritten
    // by a subsequent call to Scan. It does no allocation.
    func (s *Scanner) Bytes() []byte {
    	return s.token
    }
    
    // Text returns the most recent token generated by a call to [Scanner.Scan]
    // as a newly allocated string holding its bytes.
    func (s *Scanner) Text() string {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  3. tests/scan_test.go

    	if res.ID != user3.ID || res.Name != user3.Name || res.Age != int(user3.Age) {
    		t.Fatalf("Scan into struct should work, got %#v, should %#v", res, user3)
    	}
    
    	doubleAgeRes := &result{}
    	if err := DB.Table("users").Select("age + age as age").Where("id = ?", user3.ID).Scan(&doubleAgeRes).Error; err != nil {
    		t.Errorf("Scan to pointer of pointer")
    	}
    
    	if doubleAgeRes.Age != int(res.Age)*2 {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat May 28 14:18:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  4. src/bufio/scan_test.go

    		// Use a string range loop to validate the sequence of runes.
    		for i, expect = range test {
    			if !s.Scan() {
    				break
    			}
    			runeCount++
    			got, _ := utf8.DecodeRune(s.Bytes())
    			if got != expect {
    				t.Errorf("#%d: %d: expected %q got %q", n, i, expect, got)
    			}
    		}
    		if s.Scan() {
    			t.Errorf("#%d: scan ran too long, got %q", n, s.Text())
    		}
    		testRuneCount := utf8.RuneCountInString(test)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  5. src/bufio/example_test.go

    		// There is one final token to be delivered, which may be the empty string.
    		// Returning bufio.ErrFinalToken here tells Scan there are no more tokens after this
    		// but does not trigger an error to be returned from Scan itself.
    		return 0, data, bufio.ErrFinalToken
    	}
    	scanner.Split(onComma)
    	// Scan.
    	for scanner.Scan() {
    		fmt.Printf("%q ", scanner.Text())
    	}
    	if err := scanner.Err(); err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  6. schema/serializer.go

    	return string(result), err
    }
    
    // UnixSecondSerializer json serializer
    type UnixSecondSerializer struct{}
    
    // Scan implements serializer interface
    func (UnixSecondSerializer) Scan(ctx context.Context, field *Field, dst reflect.Value, dbValue interface{}) (err error) {
    	t := sql.NullTime{}
    	if err = t.Scan(dbValue); err == nil && t.Valid {
    		err = field.Set(ctx, dst, t.Time.Unix())
    	}
    
    	return
    }
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. tests/scanner_valuer_test.go

    	// prepend asterisks
    	return append([]byte("***"), data...), nil
    }
    
    type Num int64
    
    func (i *Num) Scan(src interface{}) error {
    	switch s := src.(type) {
    	case []byte:
    		n, _ := strconv.Atoi(string(s))
    		*i = Num(n)
    	case int64:
    		*i = Num(s)
    	default:
    		return errors.New("Cannot scan NamedInt from " + reflect.ValueOf(src).String())
    	}
    	return nil
    }
    
    type StringsSlice []string
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  8. tests/benchmark_test.go

    }
    
    func BenchmarkScan(b *testing.B) {
    	user := *GetUser("scan", Config{})
    	DB.Create(&user)
    
    	var u User
    	b.ResetTimer()
    	for x := 0; x < b.N; x++ {
    		DB.Raw("select * from users where id = ?", user.ID).Scan(&u)
    	}
    }
    
    func BenchmarkScanSlice(b *testing.B) {
    	DB.Exec("delete from users")
    	for i := 0; i < 10_000; i++ {
    		user := *GetUser(fmt.Sprintf("scan-%d", i), Config{})
    		DB.Create(&user)
    	}
    
    	var u []User
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jun 01 03:50:57 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  9. .github/ISSUE_TEMPLATE/30_contributor_regression.yml

          description: What version of Gradle gives proper result for your case?
        validations:
          required: true
      - type: input
        id: build-scan-url
        attributes:
          label: Build scan URL (optional)
          description: |
            You can run your build command with `--scan` to publish a Build Scan to [scans.gradle.com](https://scans.gradle.com/).
        validations:
          required: false
      - type: textarea
        id: environment
    Others
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Feb 16 07:49:32 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  10. .github/ISSUE_TEMPLATE/10_contributor_bug_report.yml

          description: What version of Gradle are you running?
        validations:
          required: true
      - type: input
        id: build-scan-url
        attributes:
          label: Build scan URL (optional)
          description: |
            You can run your build command with `--scan` to publish a Build Scan to [scans.gradle.com](https://scans.gradle.com/).
        validations:
          required: false
      - type: textarea
        id: environment
    Others
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Feb 16 07:49:32 GMT 2024
    - 3K bytes
    - Viewed (0)
Back to top