- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExecRawSqlUser1 (0.25 sec)
-
tests/sql_builder_test.go
var name string var age int64 rows.Scan(&name, &age) count++ } if count != 2 { t.Errorf("Should found two records") } } func TestRaw(t *testing.T) { user1 := User{Name: "ExecRawSqlUser1", Age: 1} user2 := User{Name: "ExecRawSqlUser2", Age: 10} user3 := User{Name: "ExecRawSqlUser3", Age: 20} DB.Save(&user1).Save(&user2).Save(&user3) type result struct { Name string Email string }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 16.7K bytes - Viewed (0)