Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for mysqlVersionAtLeast (0.12 seconds)

  1. tests/helper_test.go

    	}
    }
    
    func isTiDB() bool {
    	return os.Getenv("GORM_DIALECT") == "tidb"
    }
    
    func isMysql() bool {
    	return os.Getenv("GORM_DIALECT") == "mysql"
    }
    
    func mysqlVersionAtLeast(major, minor int) bool {
    	if !isMysql() {
    		return false
    	}
    
    	var version string
    	if err := DB.Raw("SELECT VERSION()").Row().Scan(&version); err != nil {
    		return false
    	}
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:27:38 GMT 2026
    - 8.6K bytes
    - Click Count (0)
Back to Top