Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Seys (0.17 sec)

  1. clause/set.go

    	clause.Expression = Set(copiedAssignments)
    }
    
    func Assignments(values map[string]interface{}) Set {
    	keys := make([]string, 0, len(values))
    	for key := range values {
    		keys = append(keys, key)
    	}
    	sort.Strings(keys)
    
    	assignments := make([]Assignment, len(keys))
    	for idx, key := range keys {
    		assignments[idx] = Assignment{Column: Column{Name: key}, Value: values[key]}
    	}
    	return assignments
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Nov 29 03:02:44 GMT 2021
    - 1.4K bytes
    - Viewed (0)
  2. tests/multi_primary_keys_test.go

    	}
    
    	if name := DB.Dialector.Name(); name == "postgres" {
    		stmt := gorm.Statement{DB: DB}
    		stmt.Parse(&Blog{})
    		stmt.Schema.LookUpField("ID").Unique = true
    		stmt.Parse(&Tag{})
    		stmt.Schema.LookUpField("ID").Unique = true
    		// postgers only allow unique constraint matching given keys
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 12.8K bytes
    - Viewed (0)
  3. errors.go

    	ErrMissingWhereClause = errors.New("WHERE conditions required")
    	// ErrUnsupportedRelation unsupported relations
    	ErrUnsupportedRelation = errors.New("unsupported relations")
    	// ErrPrimaryKeyRequired primary keys required
    	ErrPrimaryKeyRequired = errors.New("primary key required")
    	// ErrModelValueRequired model value required
    	ErrModelValueRequired = errors.New("model value required")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 02:53:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  4. tests/preload_suits_test.go

    	}
    }
    
    func TestManyToManyPreloadWithMultiPrimaryKeys(t *testing.T) {
    	if name := DB.Dialector.Name(); name == "sqlite" || name == "sqlserver" {
    		t.Skip("skip sqlite, sqlserver due to it doesn't support multiple primary keys with auto increment")
    	}
    
    	type (
    		Level1 struct {
    			ID           uint   `gorm:"primary_key;"`
    			LanguageCode string `gorm:"primary_key"`
    			Value        string
    		}
    		Level2 struct {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Mar 18 05:38:46 GMT 2022
    - 30.3K bytes
    - Viewed (0)
  5. callbacks/helper.go

    	values.Columns = make([]clause.Column, 0, len(mapValue))
    	selectColumns, restricted := stmt.SelectAndOmitColumns(true, false)
    
    	keys := make([]string, 0, len(mapValue))
    	for k := range mapValue {
    		keys = append(keys, k)
    	}
    	sort.Strings(keys)
    
    	for _, k := range keys {
    		value := mapValue[k]
    		if stmt.Schema != nil {
    			if field := stmt.Schema.LookUpField(k); field != nil {
    				k = field.DBName
    			}
    		}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 14 12:32:57 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  6. statement.go

    			}
    		case map[string]string:
    			keys := make([]string, 0, len(v))
    			for i := range v {
    				keys = append(keys, i)
    			}
    			sort.Strings(keys)
    
    			for _, key := range keys {
    				conds = append(conds, clause.Eq{Column: key, Value: v[key]})
    			}
    		case map[string]interface{}:
    			keys := make([]string, 0, len(v))
    			for i := range v {
    				keys = append(keys, i)
    			}
    			sort.Strings(keys)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  7. callbacks/update.go

    	switch value := updatingValue.Interface().(type) {
    	case map[string]interface{}:
    		set = make([]clause.Assignment, 0, len(value))
    
    		keys := make([]string, 0, len(value))
    		for k := range value {
    			keys = append(keys, k)
    		}
    		sort.Strings(keys)
    
    		for _, k := range keys {
    			kv := value[k]
    			if _, ok := kv.(*gorm.DB); ok {
    				kv = []interface{}{kv}
    			}
    
    			if stmt.Schema != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
  8. schema/relationship.go

    				schema.err = fmt.Errorf("invalid polymorphic foreign keys %+v for %v on field %s", relation.foreignKeys,
    					schema, field.Name)
    			}
    		}
    
    		if primaryKeyField == nil {
    			schema.err = fmt.Errorf("invalid polymorphic type %v for %v on field %s, missing primaryKey field",
    				relation.FieldSchema, schema, field.Name)
    			return
    		}
    
    		// use same data type for foreign keys
    		if copyableDataType(primaryKeyField.DataType) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  9. tests/tests_test.go

    		}
    		db, err = gorm.Open(mysql.Open(dbDSN), cfg)
    	default:
    		log.Println("testing sqlite3...")
    		db, err = gorm.Open(sqlite.Open(filepath.Join(os.TempDir(), "gorm.db")), cfg)
    		if err == nil {
    			db.Exec("PRAGMA foreign_keys = ON")
    		}
    	}
    
    	if err != nil {
    		return
    	}
    
    	if debug := os.Getenv("DEBUG"); debug == "true" {
    		db.Logger = db.Logger.LogMode(logger.Info)
    	} else if debug == "false" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  10. schema/schema.go

    	if schema.PrioritizedPrimaryField == nil {
    		if len(schema.PrimaryFields) == 1 {
    			schema.PrioritizedPrimaryField = schema.PrimaryFields[0]
    		} else if len(schema.PrimaryFields) > 1 {
    			// If there are multiple primary keys, the AUTOINCREMENT field is prioritized
    			for _, field := range schema.PrimaryFields {
    				if field.AutoIncrement {
    					schema.PrioritizedPrimaryField = field
    					break
    				}
    			}
    		}
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
Back to top