Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestExceptionsWithInvalidSql (0.31 sec)

  1. tests/main_test.go

    package tests_test
    
    import (
    	"testing"
    
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestExceptionsWithInvalidSql(t *testing.T) {
    	if name := DB.Dialector.Name(); name == "sqlserver" {
    		t.Skip("skip sqlserver due to it will raise data race for invalid sql")
    	}
    
    	var columns []string
    	if DB.Where("sdsd.zaaa = ?", "sd;;;aa").Pluck("aaa", &columns).Error == nil {
    		t.Errorf("Should got error with invalid SQL")
    	}
    
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Thu Mar 24 01:31:58 UTC 2022
    - 1.4K bytes
    - Viewed (0)
Back to top