We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1a13ed commit 77cd5f7Copy full SHA for 77cd5f7
sqlmock/compare_test.go
@@ -3,14 +3,11 @@ package sqlmock
3
import "testing"
4
5
func TestSQLCompare(t *testing.T) {
6
- // 语义相等的查询
7
sql1 := "SELECT id, name FROM users WHERE age > 18 ORDER BY name"
8
sql2 := "SELECT name, id FROM users WHERE age > 18 ORDER BY name"
9
10
- // 语义不等的查询
11
sql3 := "SELECT id FROM users WHERE age > 21"
12
13
- // 比较
14
if !CompareSQL(sql1, sql2) {
15
t.Errorf("SQL statements should be semantically equal")
16
}
0 commit comments