@@ -936,3 +936,43 @@ func TestGenericsScanUUID(t *testing.T) {
936936 t .Fatalf ("wrong uuid scanned" )
937937 }
938938}
939+
940+ func TestGenericsCount (t * testing.T ) {
941+ ctx := context .Background ()
942+
943+ // Just test that the API can be called
944+ _ , err := gorm.G [User ](DB ).Count (ctx , "*" )
945+ if err != nil {
946+ t .Fatalf ("Count failed: %v" , err )
947+ }
948+ }
949+
950+ func TestGenericsUpdate (t * testing.T ) {
951+ ctx := context .Background ()
952+
953+ // Just test that the API can be called
954+ _ , err := gorm.G [User ](DB ).Where ("id = ?" , 1 ).Update (ctx , "name" , "test" )
955+ if err != nil {
956+ t .Fatalf ("Update failed: %v" , err )
957+ }
958+ }
959+
960+ func TestGenericsUpdates (t * testing.T ) {
961+ ctx := context .Background ()
962+
963+ // Just test that the API can be called
964+ _ , err := gorm.G [User ](DB ).Where ("id = ?" , 1 ).Updates (ctx , User {Name : "test" })
965+ if err != nil {
966+ t .Fatalf ("Updates failed: %v" , err )
967+ }
968+ }
969+
970+ func TestGenericsDeleteAPI (t * testing.T ) {
971+ ctx := context .Background ()
972+
973+ // Just test that the API can be called
974+ _ , err := gorm.G [User ](DB ).Where ("id = ?" , 1 ).Delete (ctx )
975+ if err != nil {
976+ t .Fatalf ("Delete failed: %v" , err )
977+ }
978+ }
0 commit comments