Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for UInt64 (0.21 sec)

  1. utils/utils.go

    	case int:
    		return strconv.FormatInt(int64(v), 10)
    	case int8:
    		return strconv.FormatInt(int64(v), 10)
    	case int16:
    		return strconv.FormatInt(int64(v), 10)
    	case int32:
    		return strconv.FormatInt(int64(v), 10)
    	case int64:
    		return strconv.FormatInt(v, 10)
    	case uint:
    		return strconv.FormatUint(uint64(v), 10)
    	case uint8:
    		return strconv.FormatUint(uint64(v), 10)
    	case uint16:
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  2. logger/sql.go

    var numericPlaceholderRe = regexp.MustCompile(`\$\d+\$`)
    
    func isNumeric(k reflect.Kind) bool {
    	switch k {
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    		return true
    	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
    		return true
    	case reflect.Float32, reflect.Float64:
    		return true
    	default:
    		return false
    	}
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  3. tests/scan_test.go

    	})
    
    	if len(results) != 2 || results[0].Name != user2.Name || results[1].Name != user3.Name {
    		t.Errorf("Scan into struct map, got %#v", results)
    	}
    
    	type ID uint64
    	var id ID
    	DB.Raw("select id from users where id = ?", user2.ID).Scan(&id)
    	if uint(id) != user2.ID {
    		t.Errorf("Failed to scan to customized data type")
    	}
    
    	var resInt interface{}
    	resInt = &User{}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat May 28 14:18:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  4. schema/field_test.go

    	for _, f := range fields {
    		checkSchemaField(t, user, f, func(f *schema.Field) {})
    	}
    }
    
    type (
    	ID      int64
    	INT     int
    	INT8    int8
    	INT16   int16
    	INT32   int32
    	INT64   int64
    	UINT    uint
    	UINT8   uint8
    	UINT16  uint16
    	UINT32  uint32
    	UINT64  uint64
    	FLOAT32 float32
    	FLOAT64 float64
    	BOOL    bool
    	STRING  string
    	TIME    time.Time
    	BYTES   []byte
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  5. clause/expression.go

    type Eq struct {
    	Column interface{}
    	Value  interface{}
    }
    
    func (eq Eq) Build(builder Builder) {
    	builder.WriteQuoted(eq.Column)
    
    	switch eq.Value.(type) {
    	case []string, []int, []int32, []int64, []uint, []uint32, []uint64, []interface{}:
    		rv := reflect.ValueOf(eq.Value)
    		if rv.Len() == 0 {
    			builder.WriteString(" IN (NULL)")
    		} else {
    			builder.WriteString(" IN (")
    			for i := 0; i < rv.Len(); i++ {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  6. schema/field.go

    			case uint8:
    				field.ReflectValueOf(ctx, value).SetUint(uint64(data))
    			case uint16:
    				field.ReflectValueOf(ctx, value).SetUint(uint64(data))
    			case uint32:
    				field.ReflectValueOf(ctx, value).SetUint(uint64(data))
    			case int64:
    				field.ReflectValueOf(ctx, value).SetUint(uint64(data))
    			case int:
    				field.ReflectValueOf(ctx, value).SetUint(uint64(data))
    			case int8:
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  7. tests/scanner_valuer_test.go

    	}
    
    	AssertObjEqual(t, result, data, "Name", "Gender", "Age")
    
    	if err := DB.Where(data).Assign(ScannerValuerStruct{Age: sql.NullInt64{Int64: 18, Valid: true}}).FirstOrCreate(&result).Error; err != nil {
    		t.Errorf("Should not raise any error, but got %v", err)
    	}
    
    	if result.Age.Int64 != 18 {
    		t.Errorf("should update age to 18")
    	}
    
    	var result2 ScannerValuerStruct
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  8. schema/index_test.go

    	Name4        string `gorm:"uniqueIndex"`
    	Name5        int64  `gorm:"index:,class:FULLTEXT,comment:hello \\, world,where:age > 10"`
    	Name6        int64  `gorm:"index:profile,comment:hello \\, world,where:age > 10"`
    	Age          int64  `gorm:"index:profile,expression:ABS(age),option:WITH PARSER parser_name"`
    	OID          int64  `gorm:"index:idx_id;index:idx_oid,unique"`
    	MemberNumber string `gorm:"index:idx_id,priority:1"`
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 8K bytes
    - Viewed (0)
  9. tests/update_test.go

    		t.Errorf("user's name should not be updated")
    	}
    }
    
    func TestUpdatesTableWithIgnoredValues(t *testing.T) {
    	type ElementWithIgnoredField struct {
    		Id           int64
    		Value        string
    		IgnoredField int64 `gorm:"-"`
    	}
    	DB.Migrator().DropTable(&ElementWithIgnoredField{})
    	DB.AutoMigrate(&ElementWithIgnoredField{})
    
    	elem := ElementWithIgnoredField{Value: "foo", IgnoredField: 10}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  10. utils/utils_test.go

    		{"int32", int32(math.MaxInt32), "2147483647"},
    		{"int64", int64(math.MaxInt64), "9223372036854775807"},
    		{"uint", uint(math.MaxUint64), "18446744073709551615"},
    		{"uint8", uint8(math.MaxUint8), "255"},
    		{"uint16", uint16(math.MaxUint16), "65535"},
    		{"uint32", uint32(math.MaxUint32), "4294967295"},
    		{"uint64", uint64(math.MaxUint64), "18446744073709551615"},
    		{"string", "abc", "abc"},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
Back to top