Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for scanner_raw_1 (0.05 sec)

  1. tests/query_test.go

    	}
    }
    
    // https://github.com/go-gorm/gorm/issues/5091
    func TestQueryScannerWithSingleColumn(t *testing.T) {
    	user := User{Name: "scanner_raw_1", Age: 10}
    	DB.Create(&user)
    
    	var result1 DoubleInt64
    	if err := DB.Model(&User{}).Where("name LIKE ?", "scanner_raw_%").Limit(1).Pluck(
    		"age", &result1).Error; err != nil {
    		t.Errorf("Failed, got error: %v", err)
    	}
    
    	AssertEqual(t, result1.data, 20)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 24 09:42:59 UTC 2024
    - 50.4K bytes
    - Viewed (0)
Back to top