Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for doThing (2.64 sec)

  1. tests/hooks_test.go

    		t.Errorf("invalid data after update, got %+v", product)
    	}
    
    	var result Product3
    	DB.First(&result, product.ID)
    
    	AssertEqual(t, result, product)
    
    	// Select to change Code, but nothing updated, price should not change
    	DB.Model(&product).Select("code").Updates(Product3{Name: "L1214", Code: "L1213"})
    
    	if product.Price != 220 || product.Code != "L1213" || product.Name != "Product New3" {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 18 01:20:29 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  2. tests/query_test.go

    		totalBatch += batch
    		return nil
    	}); result.Error == nil || result.RowsAffected > 0 {
    		t.Fatal("expected errors to have occurred, but nothing happened")
    	}
    	if totalBatch != 0 {
    		t.Fatalf("incorrect total batch, expected: %v, got: %v", 0, totalBatch)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  3. clause/on_conflict.go

    		if len(onConflict.TargetWhere.Exprs) > 0 {
    			builder.WriteString(" WHERE ")
    			onConflict.TargetWhere.Build(builder)
    			builder.WriteByte(' ')
    		}
    	}
    
    	if onConflict.DoNothing {
    		builder.WriteString("DO NOTHING")
    	} else {
    		builder.WriteString("DO UPDATE SET ")
    		onConflict.DoUpdates.Build(builder)
    	}
    
    	if len(onConflict.Where.Exprs) > 0 {
    		builder.WriteString(" WHERE ")
    		onConflict.Where.Build(builder)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Oct 07 05:46:20 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  4. tests/associations_test.go

    }
    
    func (sd emptyQueryClause) Build(clause.Builder) {
    }
    
    func (sd emptyQueryClause) MergeClause(*clause.Clause) {
    }
    
    func (sd emptyQueryClause) ModifyStatement(stmt *gorm.Statement) {
    	// do nothing
    }
    
    func TestAssociationEmptyQueryClause(t *testing.T) {
    	type Organization struct {
    		gorm.Model
    		Name string
    	}
    	type Region struct {
    		gorm.Model
    		Name          string
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Feb 08 08:29:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
Back to top