diff --git a/model/query_test.go b/model/query_test.go index e53fd3d..3affc63 100644 --- a/model/query_test.go +++ b/model/query_test.go @@ -84,7 +84,6 @@ func BenchmarkSelectXX(b *testing.B) { } func BenchmarkScannerXX(b *testing.B) { for i := 0; i < b.N; i++ { - _, err := scanners[options](anyDb[options](), ctx, Conditions()) if err != nil { panic(err) @@ -92,6 +91,16 @@ func BenchmarkScannerXX(b *testing.B) { } } +func BenchmarkSqlXQueryXX(b *testing.B) { + for i := 0; i < b.N; i++ { + var r []options + err := sq.Select(&r, "select * from wp_options") + if err != nil { + panic(err) + } + } +} + type options struct { OptionId uint64 `gorm:"column:option_id" db:"option_id" json:"option_id" form:"option_id"` OptionName string `gorm:"column:option_name" db:"option_name" json:"option_name" form:"option_name"`