Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for primarykey (0.24 sec)

  1. schema/relationship.go

    	} else {
    		primarySchemaName := primarySchema.Name
    		if primarySchemaName == "" {
    			primarySchemaName = relation.FieldSchema.Name
    		}
    
    		if len(relation.primaryKeys) > 0 {
    			for _, primaryKey := range relation.primaryKeys {
    				if f := primarySchema.LookUpField(primaryKey); f != nil {
    					primaryFields = append(primaryFields, f)
    				}
    			}
    		} else {
    			primaryFields = primarySchema.PrimaryFields
    		}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. schema/schema_helper_test.go

    					for _, rf := range r.References {
    						var primaryKey, primaryKeySchema string
    						if rf.PrimaryKey != nil {
    							primaryKey, primaryKeySchema = rf.PrimaryKey.Name, rf.PrimaryKey.Schema.Name
    						}
    						refs = append(refs, fmt.Sprintf(
    							"{PrimaryKey: %v PrimaryKeySchame: %v ForeignKey: %v ForeignKeySchema: %v PrimaryValue: %v OwnPrimaryKey: %v}",
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Dec 15 08:31:23 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  3. schema/schema_test.go

    	// check fields
    	fields := []schema.Field{
    		{Name: "ID", DBName: "id", BindNames: []string{"Model", "ID"}, DataType: schema.Uint, PrimaryKey: true, Tag: `gorm:"primarykey"`, TagSettings: map[string]string{"PRIMARYKEY": "PRIMARYKEY"}, Size: 64, HasDefaultValue: true, AutoIncrement: true},
    		{Name: "CreatedAt", DBName: "created_at", BindNames: []string{"Model", "CreatedAt"}, DataType: schema.Time},
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Dec 15 08:31:23 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  4. utils/tests/models.go

    	Name     string
    	CustomID string
    	Type     string
    }
    
    type Company struct {
    	ID   int
    	Name string
    }
    
    type Language struct {
    	Code string `gorm:"primarykey"`
    	Name string
    }
    
    type Coupon struct {
    	ID               int              `gorm:"primarykey; size:255"`
    	AppliesToProduct []*CouponProduct `gorm:"foreignKey:CouponId;constraint:OnDelete:CASCADE"`
    	AmountOff        uint32           `gorm:"column:amount_off"`
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Dec 15 08:36:08 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. clause/set.go

    			}
    			builder.WriteQuoted(assignment.Column)
    			builder.WriteByte('=')
    			builder.AddVar(builder, assignment.Value)
    		}
    	} else {
    		builder.WriteQuoted(Column{Name: PrimaryKey})
    		builder.WriteByte('=')
    		builder.WriteQuoted(Column{Name: PrimaryKey})
    	}
    }
    
    // MergeClause merge assignments clauses
    func (set Set) MergeClause(clause *Clause) {
    	copiedAssignments := make([]Assignment, len(set))
    	copy(copiedAssignments, set)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Nov 29 03:02:44 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  6. migrator/index.go

    func (idx Index) Name() string {
    	return idx.NameValue
    }
    
    // Columns return the columns of the index
    func (idx Index) Columns() []string {
    	return idx.ColumnList
    }
    
    // PrimaryKey returns the index is primary key or not.
    func (idx Index) PrimaryKey() (isPrimaryKey bool, ok bool) {
    	return idx.PrimaryKeyValue.Bool, idx.PrimaryKeyValue.Valid
    }
    
    // Unique returns whether the index is unique or not.
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Apr 11 02:32:46 UTC 2023
    - 1023 bytes
    - Viewed (0)
  7. clause/clause.go

    			c.AfterExpression.Build(builder)
    		}
    	}
    }
    
    const (
    	PrimaryKey   string = "~~~py~~~" // primary key
    	CurrentTable string = "~~~ct~~~" // current table
    	Associations string = "~~~as~~~" // associations
    )
    
    var (
    	currentTable  = Table{Name: CurrentTable}
    	PrimaryColumn = Column{Table: CurrentTable, Name: PrimaryKey}
    )
    
    // Column quote with name
    type Column struct {
    	Table string
    	Name  string
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Feb 02 09:15:08 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. migrator.go

    }
    
    // ColumnType column type interface
    type ColumnType interface {
    	Name() string
    	DatabaseTypeName() string                 // varchar
    	ColumnType() (columnType string, ok bool) // varchar(64)
    	PrimaryKey() (isPrimaryKey bool, ok bool)
    	AutoIncrement() (isAutoIncrement bool, ok bool)
    	Length() (length int64, ok bool)
    	DecimalSize() (precision int64, scale int64, ok bool)
    	Nullable() (nullable bool, ok bool)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. dbflute_fess/dfprop/littleAdjustmentMap.dfprop

        #            ; DESCRIPTION = CachedMemberStatus.get(this, "$$columnName$$", $$primaryKey$$)
        #        }
        #        ; MEMBER_SECURITY = map:{
        #            ; REMINDER_ANSWER = CachedMemberSecurity.get(this, "$$columnName$$", $$primaryKey$$)
        #            ; REMINDER_QUESTION = CachedMemberSecurity.get(this, "$$columnName$$", $$primaryKey$$)
        #        }
        #    }
        #}
        # - - - - - - - - - -/
    
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Sat Jul 25 06:04:16 UTC 2015
    - 8.8K bytes
    - Viewed (0)
  10. schema/relationship_test.go

    		},
    	})
    }
    
    func TestMany2ManyWithMultiPrimaryKeys(t *testing.T) {
    	type Tag struct {
    		ID     uint   `gorm:"primary_key"`
    		Locale string `gorm:"primary_key"`
    		Value  string
    	}
    
    	type Blog struct {
    		ID         uint   `gorm:"primary_key"`
    		Locale     string `gorm:"primary_key"`
    		Subject    string
    		Body       string
    		Tags       []Tag `gorm:"many2many:blog_tags;"`
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 25.5K bytes
    - Viewed (0)
Back to top