Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 243 for field (0.17 sec)

  1. schema/field.go

    			field.DataType = ""
    			field.IgnoreMigration = true
    		case "migration":
    			field.IgnoreMigration = true
    		}
    	}
    
    	if v, ok := field.TagSettings["->"]; ok {
    		field.Creatable = false
    		field.Updatable = false
    		if strings.ToLower(v) == "false" {
    			field.Readable = false
    		} else {
    			field.Readable = true
    		}
    	}
    
    	if v, ok := field.TagSettings["<-"]; ok {
    		field.Creatable = true
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  2. schema/field_test.go

    			t.Errorf("no error should happen when assign value to field %v, but got %v", k, err)
    		}
    	}
    	newValues2["updated_at"] = time.Time{}
    	checkField(t, userSchema, reflectValue, newValues2)
    }
    
    func TestPointerFieldValuerAndSetter(t *testing.T) {
    	var (
    		userSchema, _      = schema.Parse(&User{}, &sync.Map{}, schema.NamingStrategy{})
    		name               = "pointer_field_valuer_and_setter"
    		age           uint = 18
    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)
  3. tests/customize_field_test.go

    	if cc2.Name != "bar" {
    		t.Errorf("Failed to query CustomizeColumn")
    	}
    }
    
    func TestCustomColumnAndIgnoredFieldClash(t *testing.T) {
    	// Make sure an ignored field does not interfere with another field's custom
    	// column name that matches the ignored field.
    	type CustomColumnAndIgnoredFieldClash struct {
    		Body    string `gorm:"-"`
    		RawBody string `gorm:"column:body"`
    	}
    
    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)
  4. scan.go

    							relFields = append(relFields, rel.Field)
    							for _, name := range names[1 : subNameCount-1] {
    								rel = rel.FieldSchema.Relationships.Relations[name]
    								relFields = append(relFields, rel.Field)
    							}
    							// lastest name is raw dbname
    							dbName := names[subNameCount-1]
    							if field := rel.FieldSchema.LookUpField(dbName); field != nil && field.Readable {
    								fields[idx] = field
    
    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)
  5. schema/constraint.go

    }
    
    // ParseUniqueConstraints parse schema unique constraints
    func (schema *Schema) ParseUniqueConstraints() map[string]UniqueConstraint {
    	uniques := make(map[string]UniqueConstraint)
    	for _, field := range schema.Fields {
    		if field.Unique {
    			name := schema.namer.UniqueName(schema.Table, field.DBName)
    			uniques[name] = UniqueConstraint{Name: name, Field: field}
    		}
    	}
    	return uniques
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 07:33:54 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. schema/serializer.go

    	Value(ctx context.Context, field *Field, dst reflect.Value, fieldValue interface{}) (interface{}, error)
    }
    
    // JSONSerializer json serializer
    type JSONSerializer struct{}
    
    // Scan implements serializer interface
    func (JSONSerializer) Scan(ctx context.Context, field *Field, dst reflect.Value, dbValue interface{}) (err error) {
    	fieldValue := reflect.New(field.FieldType)
    
    	if dbValue != nil {
    		var bytes []byte
    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)
  7. cmd/tier-journal_gen.go

    func (z *jentry) DecodeMsg(dc *msgp.Reader) (err error) {
    	var field []byte
    	_ = field
    	var zb0001 uint32
    	zb0001, err = dc.ReadMapHeader()
    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	for zb0001 > 0 {
    		zb0001--
    		field, err = dc.ReadMapKeyPtr()
    		if err != nil {
    			err = msgp.WrapError(err)
    			return
    		}
    		switch msgp.UnsafeString(field) {
    		case "obj":
    			z.ObjName, err = dc.ReadString()
    Go
    - Registered: Sun Feb 25 19:28:16 GMT 2024
    - Last Modified: Thu Jun 03 21:26:51 GMT 2021
    - 6.1K bytes
    - Viewed (0)
  8. cmd/bucket-stats_gen.go

    	var field []byte
    	_ = field
    	var zb0001 uint32
    	zb0001, err = dc.ReadMapHeader()
    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	for zb0001 > 0 {
    		zb0001--
    		field, err = dc.ReadMapKeyPtr()
    		if err != nil {
    			err = msgp.WrapError(err)
    			return
    		}
    		switch msgp.UnsafeString(field) {
    		case "ReplicatedSize":
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 57.5K bytes
    - Viewed (0)
  9. cmd/sts-datatypes.go

    	// in Using IAM.
    	//
    	// Arn is a required field
    	Arn string
    
    	// A unique identifier that contains the role ID and the role session name of
    	// the role that is being assumed. The role ID is generated by AWS when the
    	// role is created.
    	//
    	// AssumedRoleId is a required field
    	AssumedRoleID string `xml:"AssumeRoleId"`
    	// contains filtered or unexported fields
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri May 27 00:58:09 GMT 2022
    - 9.9K bytes
    - Viewed (0)
  10. cmd/format-erasure.go

    	Erasure struct {
    		Version string `json:"version"` // Version of 'xl' format.
    		Disk    string `json:"drive"`   // Disk field carries assigned disk uuid.
    		// JBOD field carries the input disk order generated the first
    		// time when fresh disks were supplied.
    		JBOD []string `json:"jbod"`
    	} `json:"xl"` // Erasure field holds xl format.
    }
    
    // Represents the V2 backend disk structure version
    // under `.minio.sys` and actual data namespace.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 23.4K bytes
    - Viewed (0)
Back to top