Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for primaryKey (0.26 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
    		}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  2. 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},
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  3. 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$$)
        #        }
        #    }
        #}
        # - - - - - - - - - -/
    
    Plain Text
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Sat Jul 25 06:04:16 GMT 2015
    - 8.8K bytes
    - Viewed (0)
  4. 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}",
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. callbacks/preload.go

    				foreignFields = append(foreignFields, ref.PrimaryKey)
    			} else if ref.PrimaryValue != "" {
    				tx = tx.Where(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    			} else {
    				joinRelForeignFields = append(joinRelForeignFields, ref.ForeignKey)
    				relForeignKeys = append(relForeignKeys, ref.PrimaryKey.DBName)
    				relForeignFields = append(relForeignFields, ref.PrimaryKey)
    			}
    		}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  6. association.go

    				if ref.PrimaryValue == "" {
    					if ref.OwnPrimaryKey {
    						primaryFields = append(primaryFields, ref.PrimaryKey)
    						joinPrimaryKeys = append(joinPrimaryKeys, ref.ForeignKey.DBName)
    					} else {
    						relPrimaryFields = append(relPrimaryFields, ref.PrimaryKey)
    						joinRelPrimaryKeys = append(joinRelPrimaryKeys, ref.ForeignKey.DBName)
    					}
    				} else {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  7. 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"`
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  8. schema/schema.go

    				schema.FieldsByBindName[bindName] = field
    
    				if v != nil && v.PrimaryKey {
    					for idx, f := range schema.PrimaryFields {
    						if f == v {
    							schema.PrimaryFields = append(schema.PrimaryFields[0:idx], schema.PrimaryFields[idx+1:]...)
    						}
    					}
    				}
    
    				if field.PrimaryKey {
    					schema.PrimaryFields = append(schema.PrimaryFields, field)
    				}
    			}
    		}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  9. schema/relationship_test.go

    					References: []Reference{
    						{PrimaryKey: "ID", PrimarySchema: "Country", ForeignKey: "CountryID", ForeignSchema: "Org"},
    					},
    				},
    			},
    		},
    		"VisitingAddress": {
    			Relations: map[string]Relation{
    				"Country": {
    					Name: "Country", Type: schema.BelongsTo, Schema: "Org", FieldSchema: "Country",
    					References: []Reference{
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  10. 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
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Feb 02 09:15:08 GMT 2023
    - 1.7K bytes
    - Viewed (0)
Back to top