Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for Krause (0.24 sec)

  1. tests/scanner_valuer_test.go

    	sql.NullString
    }
    
    type Point struct {
    	X, Y int
    }
    
    func (point Point) GormDataType() string {
    	return "geo"
    }
    
    func (point Point) GormValue(ctx context.Context, db *gorm.DB) clause.Expr {
    	return clause.Expr{
    		SQL:  "ST_PointFromText(?)",
    		Vars: []interface{}{fmt.Sprintf("POINT(%d %d)", point.X, point.Y)},
    	}
    }
    
    func TestGORMValuer(t *testing.T) {
    	type UserWithPoint struct {
    		Name  string
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  2. internal/grid/muxclient.go

    		}
    		return v.Msg, v.Err
    	case <-ctx.Done():
    		if debugReqs {
    			return nil, fmt.Errorf("%d %s ERR: %w", m.MuxID, m.parent.String(), context.Cause(ctx))
    		}
    		return nil, context.Cause(ctx)
    	}
    }
    
    // send the message. msg.Seq and msg.MuxID will be set
    func (m *muxClient) send(msg message) error {
    	m.respMu.Lock()
    	defer m.respMu.Unlock()
    	if m.closed {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  3. tests/create_test.go

    	CheckUser(t, result, user)
    
    	user2 := *GetUser("omit_create", Config{Account: true, Pets: 3, Toys: 3, Company: true, Manager: true, Team: 3, Languages: 3, Friends: 4})
    	DB.Omit(clause.Associations).Create(&user2)
    
    	var result2 User
    	DB.Preload(clause.Associations).First(&result2, user2.ID)
    
    	user2.Account = Account{}
    	user2.Toys = nil
    	user2.Manager = nil
    	user2.Company = Company{}
    	user2.Pets = nil
    	user2.Team = nil
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  4. tests/transaction_test.go

    	user := User{Name: "transaction"}
    	if err := tx.Save(&user).Error; err != nil {
    		t.Fatalf("No error should raise")
    	}
    
    	if err := tx.Commit().Error; err != nil {
    		t.Fatalf("Commit should not raise error")
    	}
    
    	if err := tx.Rollback().Error; err == nil {
    		t.Fatalf("Rollback after commit should raise error")
    	}
    }
    
    func TestTransactionWithSavePoint(t *testing.T) {
    	tx := DB.Begin()
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  5. tests/update_test.go

    		t.Errorf("Not error should happen when updating with gorm expr, but got %v", err)
    	}
    
    	if err := DB.Model(&results[1]).Clauses(clause.Returning{Columns: []clause.Column{{Name: "age"}}}).Updates(map[string]interface{}{"age": gorm.Expr("age + ?", 100)}).Error; err != nil {
    		t.Errorf("Not error should happen when updating with gorm expr, but got %v", err)
    	}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  6. cmd/metacache-server-pool.go

    		} else {
    			if o.pool < len(z.serverPools) && o.set < len(z.serverPools[o.pool].sets) {
    				o.debugln("Resuming", o)
    				entries, err = z.serverPools[o.pool].sets[o.set].streamMetadataParts(ctx, *o)
    				entries.reuse = true // We read from stream and are not sharing results.
    				if err == nil {
    					return entries, nil
    				}
    			} else {
    				err = fmt.Errorf("invalid pool/set")
    				o.pool, o.set = 0, 0
    			}
    		}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  7. cmd/storage-rest-client.go

    		if resp.Update != nil {
    			select {
    			case <-ctx.Done():
    			case updates <- *resp.Update:
    			}
    		}
    		if resp.Final != nil {
    			final = resp.Final
    		}
    		// We can't reuse the response since it is sent upstream.
    		return nil
    	})
    	if err != nil {
    		return cache, toStorageErr(err)
    	}
    	if final == nil {
    		return cache, errors.New("no final cache")
    	}
    	return *final, nil
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 26K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/informers_test.go

    	// after Pod annotated, another update event will be triggered.
    	assertPodAnnotated(t, client, pod)
    
    	// Assert expected calls actually made
    	fs.AssertExpectations(t)
    
    	// unlabelling the namespace should cause only one RemovePodFromMesh to happen
    	fs.On("RemovePodFromMesh",
    		ctx,
    		mock.Anything,
    	).Once().Return(nil)
    
    	// unlabel the namespace
    	labelsPatch := []byte(fmt.Sprintf(`{"metadata":{"labels":{"%s":null}}}`,
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  9. internal/rest/client.go

    func removeEmptyPort(host string) string {
    	if hasPort(host) {
    		return strings.TrimSuffix(host, ":")
    	}
    	return host
    }
    
    // Copied from http.NewRequest but implemented to ensure we reuse `url.URL` instance.
    func (c *Client) newRequest(ctx context.Context, u url.URL, body io.Reader) (*http.Request, error) {
    	rc, ok := body.(io.ReadCloser)
    	if !ok && body != nil {
    		rc = io.NopCloser(body)
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
  10. cmd/admin-handlers-site-replication.go

    	data, err := io.ReadAll(body)
    	if err != nil {
    		return SRError{
    			Cause: err,
    			Code:  ErrSiteReplicationInvalidRequest,
    		}
    	}
    	if encryptionKey != "" {
    		data, err = madmin.DecryptData(encryptionKey, bytes.NewReader(data))
    		if err != nil {
    			return SRError{
    				Cause: err,
    				Code:  ErrSiteReplicationInvalidRequest,
    			}
    		}
    	}
    	return json.Unmarshal(data, v)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 09:40:39 GMT 2024
    - 19.4K bytes
    - Viewed (0)
Back to top