Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for WithResult (0.04 seconds)

  1. generics_withresult_test.go

    	}
    	if err := db.AutoMigrate(&withResultUser{}); err != nil {
    		t.Fatalf("migrate failed: %v", err)
    	}
    
    	ctx := context.Background()
    
    	u := withResultUser{Name: "with-result-ok"}
    	r := gorm.WithResult()
    	if err := gorm.G[withResultUser](db, r).Create(ctx, &u); err != nil {
    		t.Fatalf("create failed: %v", err)
    	}
    	if u.ID == 0 {
    		t.Fatalf("expected ID to be set")
    	}
    	if r.Error != nil {
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:34:24 GMT 2026
    - 1.2K bytes
    - Click Count (0)
  2. generics.go

    	info.Result = nil
    	info.RowsAffected = 0
    	info.Error = nil
    	stmt.Result = info
    }
    
    // Build implements clause.Expression interface
    func (result) Build(clause.Builder) {
    }
    
    func WithResult() *result {
    	return &result{}
    }
    
    type Interface[T any] interface {
    	Raw(sql string, values ...interface{}) ExecInterface[T]
    	Exec(ctx context.Context, sql string, values ...interface{}) error
    	CreateInterface[T]
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:34:24 GMT 2026
    - 26K bytes
    - Click Count (0)
Back to Top