Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Int32 (0.15 sec)

  1. logger/sql.go

    // RegEx matches only numeric values
    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)
  2. 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 (")
    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)
  3. 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
    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)
  4. utils/utils.go

    	case string:
    		return v
    	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)
    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)
  5. tests/customize_field_test.go

    		FieldAllowSave3         string `gorm:"->:false;<-:create"`
    		FieldReadonly           string `gorm:"->"`
    		FieldIgnore             string `gorm:"-"`
    		AutoUnixCreateTime      int32  `gorm:"autocreatetime"`
    		AutoUnixMilliCreateTime int    `gorm:"autocreatetime:milli"`
    		AutoUnixNanoCreateTime  int64  `gorm:"autocreatetime:nano"`
    		AutoUnixUpdateTime      uint32 `gorm:"autoupdatetime"`
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Sep 11 09:33:31 GMT 2020
    - 6.9K bytes
    - Viewed (0)
  6. schema/field.go

    				schema.err = fmt.Errorf("failed to parse %s as default value for bool, got error: %v", field.DefaultValue, err)
    			}
    		}
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    		field.DataType = Int
    		if field.HasDefaultValue && !skipParseDefaultValue {
    			if field.DefaultValueInterface, err = strconv.ParseInt(field.DefaultValue, 0, 64); err != nil {
    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. utils/utils_test.go

    		name string
    		in   interface{}
    		out  string
    	}{
    		{"int", math.MaxInt64, "9223372036854775807"},
    		{"int8", int8(math.MaxInt8), "127"},
    		{"int16", int16(math.MaxInt16), "32767"},
    		{"int32", int32(math.MaxInt32), "2147483647"},
    		{"int64", int64(math.MaxInt64), "9223372036854775807"},
    		{"uint", uint(math.MaxUint64), "18446744073709551615"},
    		{"uint8", uint8(math.MaxUint8), "255"},
    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)
  8. 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 Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. schema/relationship_test.go

    		References: []Reference{{"Refer", "Profile", "ProfileID", "User", "", false}},
    	})
    }
    
    func TestSelfReferentialBelongsTo(t *testing.T) {
    	type User struct {
    		ID        int32 `gorm:"primaryKey"`
    		Name      string
    		CreatorID *int32
    		Creator   *User
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Creator", Type: schema.BelongsTo, Schema: "User", FieldSchema: "User",
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  10. tests/embedded_struct_test.go

    		ReadOnly
    	}
    
    	type Author struct {
    		ID    string
    		Name  string
    		Email string
    	}
    
    	type HNPost struct {
    		BasePost
    		Author  `gorm:"EmbeddedPrefix:user_"` // Embedded struct
    		Upvotes int32
    	}
    
    	type EngadgetPost struct {
    		BasePost BasePost `gorm:"Embedded"`
    		Author   *Author  `gorm:"Embedded;EmbeddedPrefix:author_"` // Embedded struct
    		ImageUrl string
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
Back to top