Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for uint64_t (0.35 sec)

  1. schema/serializer.go

    	rv := reflect.ValueOf(fieldValue)
    	switch v := fieldValue.(type) {
    	case int64, int, uint, uint64, int32, uint32, int16, uint16:
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16:
    		if rv.IsZero() {
    			return nil, nil
    		}
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	default:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  2. scan.go

    			mapValue := map[string]interface{}{}
    			scanIntoMap(mapValue, values, columns)
    			*dest = append(*dest, mapValue)
    		}
    	case *int, *int8, *int16, *int32, *int64,
    		*uint, *uint8, *uint16, *uint32, *uint64, *uintptr,
    		*float32, *float64,
    		*bool, *string, *time.Time,
    		*sql.NullInt32, *sql.NullInt64, *sql.NullFloat64,
    		*sql.NullBool, *sql.NullString, *sql.NullTime:
    		for initialized || rows.Next() {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K 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 May 05 09:35:13 GMT 2024
    - Last Modified: Sat May 28 14:18:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  4. utils/utils.go

    	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:
    		return strconv.FormatUint(uint64(v), 10)
    	case uint32:
    		return strconv.FormatUint(uint64(v), 10)
    	case uint64:
    		return strconv.FormatUint(v, 10)
    	}
    	return ""
    }
    
    const nestedRelationSplit = "__"
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. logger/sql.go

    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 May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  6. clause/expression.go

    	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++ {
    				if i > 0 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  7. tests/customize_field_test.go

    		AutoUnixNanoCreateTime  int64  `gorm:"autocreatetime:nano"`
    		AutoUnixUpdateTime      uint32 `gorm:"autoupdatetime"`
    		AutoUnixMilliUpdateTime int    `gorm:"autoupdatetime:milli"`
    		AutoUnixNanoUpdateTime  uint64 `gorm:"autoupdatetime:nano"`
    	}
    
    	DB.Migrator().DropTable(&CustomizeFieldStruct{})
    
    	if err := DB.AutoMigrate(&CustomizeFieldStruct{}); err != nil {
    		t.Errorf("Failed to migrate, got error: %v", err)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Sep 11 09:33:31 GMT 2020
    - 6.9K bytes
    - Viewed (0)
  8. schema/field_test.go

    	}
    }
    
    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
    
    	TypeAlias struct {
    		ID
    		INT     `gorm:"column:fint"`
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  9. 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 May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  10. utils/utils_test.go

    		{"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"},
    		{"other", true, ""},
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
Back to top