Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for Invalid (1.12 sec)

  1. tests/sql_builder_test.go

    		t.Fatalf("invalid sql generated, got %v", sql)
    	}
    
    	sql = dryRunDB.Where("a = ? or b = ?", "a", "b").Or("c = ? and d = ?", "c", "d").Find(&User{}).Statement.SQL.String()
    	if !regexp.MustCompile(`WHERE \(\(a = .+ or b = .+\) OR \(c = .+ and d = .+\)\) AND .users.\..deleted_at. IS NULL`).MatchString(sql) {
    		t.Fatalf("invalid sql generated, got %v", sql)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Jan 12 08:42:21 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  2. schema/relationship.go

    	}
    
    	if relation.Polymorphic.PolymorphicType == nil {
    		schema.err = fmt.Errorf("invalid polymorphic type %v for %v on field %s, missing field %s",
    			relation.FieldSchema, schema, field.Name, polymorphic+"Type")
    	}
    
    	if relation.Polymorphic.PolymorphicID == nil {
    		schema.err = fmt.Errorf("invalid polymorphic type %v for %v on field %s, missing field %s",
    			relation.FieldSchema, schema, field.Name, polymorphic+"ID")
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  3. tests/query_test.go

    						if _, ok := first[dbName].(string); !ok {
    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					case "Age":
    						if _, ok := first[dbName].(uint); !ok {
    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					case "Birthday":
    						if _, ok := first[dbName].(*time.Time); !ok {
    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  4. callbacks/create.go

    			defaultValueFieldsHavingValue := map[*schema.Field][]interface{}{}
    			for i := 0; i < rValLen; i++ {
    				rv := reflect.Indirect(stmt.ReflectValue.Index(i))
    				if !rv.IsValid() {
    					stmt.AddError(fmt.Errorf("slice data #%v is invalid: %w", i, gorm.ErrInvalidData))
    					return
    				}
    
    				values.Values[i] = make([]interface{}, len(values.Columns))
    				for idx, column := range values.Columns {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 08 03:29:55 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  5. callbacks/query.go

    					clauseSelect.Columns = append(clauseSelect.Columns, clause.Column{Table: db.Statement.Table, Name: dbName})
    				}
    			}
    		} else if db.Statement.Schema != nil && db.Statement.ReflectValue.IsValid() {
    			queryFields := db.QueryFields
    			if !queryFields {
    				switch db.Statement.ReflectValue.Kind() {
    				case reflect.Struct:
    					queryFields = db.Statement.ReflectValue.Type() != db.Statement.Schema.ModelType
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 09:51:44 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  6. finisher_api.go

    		tx.AddError(err)
    	}
    	tx.Statement.Dest = dest
    	tx.Statement.ReflectValue = reflect.ValueOf(dest)
    	for tx.Statement.ReflectValue.Kind() == reflect.Ptr {
    		elem := tx.Statement.ReflectValue.Elem()
    		if !elem.IsValid() {
    			elem = reflect.New(tx.Statement.ReflectValue.Type().Elem())
    			tx.Statement.ReflectValue.Set(elem)
    		}
    		tx.Statement.ReflectValue = elem
    	}
    	Scan(rows, tx, ScanInitialized)
    	return tx.Error
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Jan 12 08:42:21 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  7. utils/utils_test.go

    		{"error not equal", errors.New("1"), errors.New("2"), false},
    		{"driver.Valuer equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now, Valid: true}, true},
    		{"driver.Valuer not equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now.Add(time.Second), Valid: true}, false},
    		{"driver.Valuer equal (ptr to nil ptr)", (*ModifyAt)(nil), &ModifyAt{}, false},
    	}
    	for _, test := range assertEqualTests {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Feb 19 03:42:25 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  8. tests/associations_has_many_test.go

    		t.Fatalf("should only find one pets, but got %v", count)
    	}
    
    	if count := DB.Model(&user).Where("name = ?", "not found").Association("Pets").Count(); count != 0 {
    		t.Fatalf("should only find no pet with invalid conditions, but got %v", count)
    	}
    
    	// Count
    	AssertAssociationCount(t, user, "Pets", 2, "")
    
    	// Append
    	pet := Pet{Name: "pet-has-many-append"}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
  9. tests/helper_test.go

    	t.Run("Account", func(t *testing.T) {
    		AssertObjEqual(t, user.Account, expect.Account, "ID", "CreatedAt", "UpdatedAt", "DeletedAt", "UserID", "Number")
    
    		if user.Account.Number != "" {
    			if !user.Account.UserID.Valid {
    				t.Errorf("Account's foreign key should be saved")
    			} else {
    				var account Account
    				db(unscoped).First(&account, "user_id = ?", user.ID)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 8K bytes
    - Viewed (0)
  10. schema/serializer.go

    	case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16:
    		if rv.IsZero() {
    			return nil, nil
    		}
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	default:
    		err = fmt.Errorf("invalid field type %#v for UnixSecondSerializer, only int, uint supported", v)
    	}
    	return
    }
    
    // GobSerializer gob serializer
    type GobSerializer struct{}
    
    // Scan implements serializer interface
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 08:28:46 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top