Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for tool (0.19 sec)

  1. scan.go

    		}
    
    		if len(joinFields) == 0 || len(joinFields[idx]) == 0 {
    			db.AddError(field.Set(db.Statement.Context, reflectValue, values[idx]))
    		} else { // joinFields count is larger than 2 when using join
    			var isNilPtrValue bool
    			var relValue reflect.Value
    			// does not contain raw dbname
    			nestedJoinSchemas := joinFields[idx][:len(joinFields[idx])-1]
    			// current reflect value
    			currentReflectValue := reflectValue
    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)
  2. tests/preload_test.go

    			Manager: &User{
    				Name: "Alexis Manager",
    				Tools: []Tools{
    					{Name: "Alexis Tool 1"},
    					{Name: "Alexis Tool 2"},
    				},
    			},
    		},
    		{
    			Name: "TestMergeNestedPreloadWithNestedJoin-2",
    			Manager: &User{
    				Name: "Jinzhu Manager",
    				Tools: []Tools{
    					{Name: "Jinzhu Tool 1"},
    					{Name: "Jinzhu Tool 2"},
    				},
    			},
    		},
    	}
    
    	DB.Create(&users)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  3. utils/utils.go

    		}
    	}
    
    	return ""
    }
    
    func IsValidDBNameChar(c rune) bool {
    	return !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '.' && c != '*' && c != '_' && c != '$' && c != '@'
    }
    
    // CheckTruth check string true or not
    func CheckTruth(vals ...string) bool {
    	for _, val := range vals {
    		if val != "" && !strings.EqualFold(val, "false") {
    			return true
    		}
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. migrator/migrator.go

    func (m Migrator) ReorderModels(values []interface{}, autoAdd bool) (results []interface{}) {
    	type Dependency struct {
    		*gorm.Statement
    		Depends []*schema.Schema
    	}
    
    	var (
    		modelNames, orderedModelNames []string
    		orderedModelNamesMap          = map[string]bool{}
    		parsedSchemas                 = map[*schema.Schema]bool{}
    		valuesMap                     = map[string]Dependency{}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  5. callbacks/preload.go

    	preloadNames := make([]string, 0, len(preloadMap))
    	for key := range preloadMap {
    		preloadNames = append(preloadNames, key)
    	}
    	sort.Strings(preloadNames)
    
    	isJoined := func(name string) (joined bool, nestedJoins []string) {
    		for _, join := range joins {
    			if _, ok := relationships.Relations[join]; ok && name == join {
    				joined = true
    				continue
    			}
    			joinNames := strings.SplitN(join, ".", 2)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  6. schema/field.go

    	PrimaryKey             bool
    	AutoIncrement          bool
    	AutoIncrementIncrement int64
    	Creatable              bool
    	Updatable              bool
    	Readable               bool
    	AutoCreateTime         TimeType
    	AutoUpdateTime         TimeType
    	HasDefaultValue        bool
    	DefaultValue           string
    	DefaultValueInterface  interface{}
    	NotNull                bool
    	Unique                 bool
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  7. schema/relationship.go

    type Polymorphic struct {
    	PolymorphicID   *Field
    	PolymorphicType *Field
    	Value           string
    }
    
    type Reference struct {
    	PrimaryKey    *Field
    	PrimaryValue  string
    	ForeignKey    *Field
    	OwnPrimaryKey bool
    }
    
    func (schema *Schema) parseRelation(field *Field) *Relationship {
    	var (
    		err        error
    		fieldValue = reflect.New(field.IndirectFieldType).Interface()
    		relation   = &Relationship{
    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)
  8. tests/query_test.go

    	if err := DB.Model(User{}).Where("name like ?", "pluck-user%").Order("name desc").Pluck("name", &names2).Error; err != nil {
    		t.Errorf("got error when pluck name: %v", err)
    	}
    
    	sort.Slice(names2, func(i, j int) bool { return names2[i] < names2[j] })
    	AssertEqual(t, names, names2)
    
    	var ids []int
    	if err := DB.Model(User{}).Where("name like ?", "pluck-user%").Pluck("id", &ids).Error; err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top